Skip to content

preferences: restore preference state#9166

Merged
vince-fugnitto merged 1 commit intomasterfrom
vf/preference-state
Mar 12, 2021
Merged

preferences: restore preference state#9166
vince-fugnitto merged 1 commit intomasterfrom
vf/preference-state

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