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: update 'modified scope' #8025

Merged
merged 1 commit into from
Jun 23, 2020
Merged

Conversation

vince-fugnitto
Copy link
Member

What it does

The following pull-request updates the preferences-view to properly display the 'modified scope' message when a preference is updated from it's default value in a different scope (between user and workspace only at the moment).

Viewing 'User' - 'Workspace' Updated:

user-pref

Viewing 'Workspace' - 'User' Updated:

workspace-pref

Both Scopes Updated:

both-pref

The following pull-request updates the preferences modified scope
message to display messages in the user tab when there are updates to
the preference in the workspace scope.

How to test

  1. open the preferences-view
  2. modify preferences in the user, workspace scope and verify that the message works properly

Review checklist

Reminder for reviewers

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

@vince-fugnitto vince-fugnitto added bug bugs found in the application preferences issues related to preferences labels Jun 16, 2020
@vince-fugnitto vince-fugnitto self-assigned this Jun 16, 2020
Copy link
Contributor

@colin-grant-work colin-grant-work left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for finding this bug and addressing it so quickly. I've encountered to odd behaviors. One I've remarked on below, and the other is that I'm getting the message in Workspace scope about User scope even when the values are the same and both are default:

Here's application.confirmExit in User unmodified

image

And the same preference in Workspace, also unmodified:

image

Since this is only happening with certain preferences and not all, I think it may be related to #7685 , since application.confirmExit is a preference that seems almost never to fire an event in User scope. That's probably beyond the scope of this PR, but worth noting as an additional symptom of that issue.

The following pull-request updates the `preferences` modified scope
message to display messages in the `user` tab when there are updates to
the preference in the `workspace` scope.

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

@lmcbout lmcbout left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works fine
Suggestion: In the tab which apply the new preference, there is a Blue line (Before the preference) showing this preference is modified in settings,json. In the other tab (User | Workspace) you display a string beside the pref ( Modified in: User) Can we make this string in Blue so it would be more visible when scrolling through the preference? It would make this PR Better

@vince-fugnitto
Copy link
Member Author

vince-fugnitto commented Jun 18, 2020

Works fine
Suggestion: In the tab which apply the new preference, there is a Blue line (Before the preference) showing this preference is modified in settings,json. In the other tab (User | Workspace) you display a string beside the pref ( Modified in: User) Can we make this string in Blue so it would be more visible when scrolling through the preference? It would make this PR Better

@lmcbout the blue line (on the left side of the preference) indicates that the preference is updated from it's default. If you are viewing a different scope (and it has the default value) the blue line is not visible (similarly to vscode).

For example, in vscode it is the same:

1

2

@lmcbout
Copy link
Contributor

lmcbout commented Jun 18, 2020

The Blue line is fine where you modified the preference setting, but can we have a more distinctive indicator in the other preference view than just adding the "Modified in: User" beside the preference?

If so, this would be better to see the preference is modified in the other scope

Copy link
Contributor

@Anasshahidd21 Anasshahidd21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes work well on my side.
Tested both when there are changes done in both the scopes for a certain extension, as well as when changes are made only to one scope.
01 (2)

02 (2)

@vince-fugnitto
Copy link
Member Author

@colin-grant-work are you fine with the latest changes? :)

@colin-grant-work
Copy link
Contributor

@vince-fugnitto, Yes, taken another look, and everything is working nicely. Well done!

@vince-fugnitto
Copy link
Member Author

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

@vince-fugnitto vince-fugnitto merged commit 6ab1e95 into master Jun 23, 2020
@vince-fugnitto vince-fugnitto deleted the vf/preferences-mod branch June 23, 2020 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs found in the application preferences issues related to preferences
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants