-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
I've been looking at trying to improve the "self registration process". I have two thoughts on how we can improve this:
- Don't use self registration for core components - it makes perfect sense for plugins where they can access the glimpse API to register themselves, but very little sense for core components where they are explicitly loaded from somewhere. Wherever possible, a module should provide an external API and loading it should be side effect free. By having calling code explicitly register the components, we can achieve this.
- We seem to have one more level of indirection than we're actually using. We have applications self registering into the shell and "tabs" self registering into the "request". The second of these makes perfect sense, but I'm not sure I can see a strong use case for plugins registering additional applications into the shell?
- It seems to me like
request/request.js(which is responsible for telling the repositories to fetch data) is really just a dependency ofrequest-user-view.jsxandrequest-summary-view.jsx. We could move the relevant code to there and remove that awkward self-registration.
These changes should also make it easier to test components in isolation.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels