Skip to content

Improve the Contextual component example in the GJS branch #2139

@mansona

Description

@mansona

While reviewing #2127 we hit a few issues around the "Super Form" example in the "contextual components" section.

We decided to fix the example so that it's technically correct but we really need to improve this whole section 🙈

Some suggestions of what to fix (not an exhaustive list)

  • we should never really be yielding out this, that is a bad idea that leads to bad outcomes with bad API design. If we want to yield some internal state from the SuperForm then it should be more granular
  • this whole example is very much a toy and it doesn't describe why you might want to use contextual components at all. Maybe adding the internal state might fix that, maybe we need better context in the example.
  • the null hypothesis: should we even teach contextual components any more? is it a valuable architectural decision in 2025
  • do we even need the (helper helper? 🙈

feel free to add any more suggestions to this list as you see fit 👍

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions