You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.
A class of Issue that keeps coming up is the feature that has too many possible implementations. Designing, coding and supporting all the possible implementations that the community asserts should be "the default" is too daunting a task. Some examples of Issues like this are:
Behavior when opening files via drag-and-drop, from the command line, whether inside or outside of the project folder ... whether there is a "project" or not, etc
Additionally, adding configuration options for all the possible permutations of these behaviors is hard to design and difficult for users to understand.
Because of these challenges, I wanted to design a system that:
Keeps the base installation of Atom simpler and more approachable for new users
Allows for maximum configurability in keeping with the "hackable to the core" philosophy of Atom
Removes the necessity of the Atom Core team supporting all possible options
How It Works
When a feature (described as "foo" in this example) is identified for this approach:
A "behavior service" should be designed and built into Atom Core as: atom.foo-behavior
The current behavior should be used as a fallback in the case that no service provides an alternative (see the atom.file-icons service in the tree-view package as an example)
By convention, packages that implement alternatives will end with foo-behavior like my-awesome-foo-behavior
Any interested party implements a package that provides the service to customize Atom's behavior
Benefits
With this system in use, anyone can easily come along and implement their own behavior for this particular feature without:
Needing to describe the behavior in detail (the best specification is code, after all)
Needing to convince anyone that this is a good idea or "deserves to be in core"
This also allows for Atom to act in a manner that is perhaps more familiar and comfortable to the user but goes against the conventions of the platform that they are running Atom upon.
Challenges
There are some pitfalls I've identified with this approach. I don't think that they are significant enough to prevent going ahead with this, but they should be kept in mind and solutions should be identified and implemented over time.
How Granular Should Behavior Services Be?
In the example of the closing the last open file or last window mentioned in the introduction, there are actually a few tightly-related behaviors:
Does closing the last tab close the window?
Does closing the last window exit the application?
Does closing the last tab in a pane destroy the pane?
Does using the standard close command close the window if there is no file open?
Should this be one service? Or four? Or somewhere in between? Because of the way the service hub system works, there can be only one loaded and activated provider.
Discoverability
Let's say I have installed a package that overrides the tab/pane/window close behavior. How do we indicate to the user that to configure this behavior they no longer use the built-in configuration options, but have to go to the super-special-close-behavior package settings to configure it?
Supportability
When someone has an issue with how Atom is behaving, how can we easily find out that they have the super-broken-close-behavior package installed and enabled?
/cc @atom/feedback
The text was updated successfully, but these errors were encountered:
I like this idea. Definitely the hard part seems to be in determining the edges in each case. I think we could come up with a behavior service for one feature and see how it goes.
One way to override existing functionality would be to override or hijack an event subscription. Say the tree-view listens for a double-click, override its action with your own.
of course the possibilities for carnage are through the roof.
This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!
lockbot
locked and limited conversation to collaborators
Mar 30, 2018
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
A class of Issue that keeps coming up is the feature that has too many possible implementations. Designing, coding and supporting all the possible implementations that the community asserts should be "the default" is too daunting a task. Some examples of Issues like this are:
Additionally, adding configuration options for all the possible permutations of these behaviors is hard to design and difficult for users to understand.
Because of these challenges, I wanted to design a system that:
How It Works
When a feature (described as "foo" in this example) is identified for this approach:
atom.foo-behavior
atom.file-icons
service in the tree-view package as an example)foo-behavior
likemy-awesome-foo-behavior
Benefits
With this system in use, anyone can easily come along and implement their own behavior for this particular feature without:
This also allows for Atom to act in a manner that is perhaps more familiar and comfortable to the user but goes against the conventions of the platform that they are running Atom upon.
Challenges
There are some pitfalls I've identified with this approach. I don't think that they are significant enough to prevent going ahead with this, but they should be kept in mind and solutions should be identified and implemented over time.
How Granular Should Behavior Services Be?
In the example of the closing the last open file or last window mentioned in the introduction, there are actually a few tightly-related behaviors:
Should this be one service? Or four? Or somewhere in between? Because of the way the service hub system works, there can be only one loaded and activated provider.
Discoverability
Let's say I have installed a package that overrides the tab/pane/window close behavior. How do we indicate to the user that to configure this behavior they no longer use the built-in configuration options, but have to go to the
super-special-close-behavior
package settings to configure it?Supportability
When someone has an issue with how Atom is behaving, how can we easily find out that they have the
super-broken-close-behavior
package installed and enabled?/cc @atom/feedback
The text was updated successfully, but these errors were encountered: