Skip to content
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

preferences: restore preference state #9166

Merged
merged 1 commit into from
Mar 12, 2021
Merged

Conversation

vince-fugnitto
Copy link
Member

@vince-fugnitto vince-fugnitto commented Mar 9, 2021

What it does

Fixes: #7746

The following pull-request adds functionality in order to restore the preferences-view state when reloading the application.

The state includes:

  • restoring the search term and consequently the result.
  • restoring the currently selected workspace scope.
  • restoring the editor location (through the firstVisibleChildID.

Master:

master.mov

Pull-Request:

pr-search.mov

How to test

Search Term

  1. start the application, and open the preferences-view
  2. enter a search term (ex: fontSize)
  3. the view should perform a search
  4. reload the application, the search term should persist and the results should be updated

Scope

  1. start the application, and open the preferences-view
  2. switch scopes (user, workspace, folder (multi-root))
  3. reload the application, the scope should be preserved

Editor

  1. start the application, and open the preferences-view
  2. scroll the editor (ex: to scss/lint)
  3. reload the application, the editor should be preserved at the last visible child

Review checklist

Reminder for reviewers

Signed-off-by: vince-fugnitto vincent.fugnitto@ericsson.com

@vince-fugnitto vince-fugnitto added the preferences issues related to preferences label Mar 9, 2021
@vince-fugnitto vince-fugnitto self-assigned this Mar 9, 2021
@colin-grant-work colin-grant-work self-requested a review March 9, 2021 23:16
The following commit restores the `preferences-ui` state when reloading
the application.

The state includes:
- restoring the search term.
- restoring the currently selected workspace scope.
- restoring the editor location (through the `firstVisibleChildID`.

Signed-off-by: vince-fugnitto <vincent.fugnitto@ericsson.com>
@colin-grant-work
Copy link
Contributor

Code LGTM, and the functionality is as described. Thanks for picking up the slack left by the first Preference Widget commit 🙏

@vince-fugnitto
Copy link
Member Author

I'll merge the pull-request tomorrow if there are no objections.

@vince-fugnitto vince-fugnitto merged commit 9ddb367 into master Mar 12, 2021
@vince-fugnitto vince-fugnitto deleted the vf/preference-state branch March 12, 2021 14:01
@github-actions github-actions bot added this to the 1.12.0 milestone Mar 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
preferences issues related to preferences
Projects
None yet
Development

Successfully merging this pull request may close these issues.

preferences: improve storing the state of the widget
2 participants