-
Notifications
You must be signed in to change notification settings - Fork 62
GPII-1885: Implemented isConfigurable and makeConfigurable functions #462
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
kaspermarkus
wants to merge
3
commits into
GPII:master
Choose a base branch
from
kaspermarkus:GPII-1885
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
gpii/node_modules/lifecycleManager/src/LifecycleManager.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
110 changes: 110 additions & 0 deletions
110
gpii/node_modules/lifecycleManager/test/js/LifecycleManagerTests.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both of these examples now refer to nonexistent functions. I think it would be better to reinstate them, with some tests, so that we create a facility which is actually usable. Don't we have an actual use case for this feature - if not, why are we implementing it? Unfortunately GPII-1885 is a TLJ so the reason why it is on our roadmap is unclear.
Could you please
i) Flesh out GPII-1885 by adding or linking to information explaining why we are implementing it
ii) Write up a JIRA for the facility of being able to invoke settingsHandlers from the makeConfigurable/isConfigurable blocks together with a sketch of what this might look like
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the feedback @amb26. I've updated GPII-1885 with more details now, and created (and linked) GPII-2057 for the settingshandler work. Would you suggest that I just fix 2057 while I'm at it - together with and implementation of gpii.lifecycleActions.pathExists, these might make for some good examples and useful functionality
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it sounds good - we may as well verify that this functionality is actually good for something, since it is no longer good for the original use case. Is it possible that the ORCA settings handler might be the only genuine use for this function in our current solutions? If we can demonstrate that we can simplify the logic there and have it simply consist of the JSON settings handler, then we have a reasonable win. If we can't actually find a single genuine use of this system, I wonder whether we shouldn't mothball it. I know it's an awful thing to suggest given you have put so much work into this pull, but I think it is desirable to keep the principle that any code we have in the codebase meets at least one real use case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no - I completely agree, that if there is no proper use case it should be mothballed, else it'll just pollute the code base, risk going stale, etc..
I talked with @javihernandez yesterday, and it does indeed seem that ORCA (and, I believe NVDA) needs extra actions the first time they're used. Though the use case there is that they need to be started and then stopped (which will trigger their initial setup routine), before the settings are set. Anyway, I'll let him confirm/unconfirm this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I can confirm that behavior with both Orca and NVDA. Isn't it a good use case?
Can't we just move my implementation of "makeConfigurable" (https://github.com/GPII/linux/blob/a0acb4730edd0382dfd2010a9a713cff29268523/gpii/node_modules/orca/orcaSettingsHandler.js#L118) into a utility function in universal that can be used by any application that requires a start/stop cycle before being configured? By having this and by adding a few improvements to the JSON settings handler (mostly, being able to write the settings in the right profile), the infamous orca settings handler would disappear for the rest of the days 💃