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

FormatBar: Set sensitivity of affected items, fix binding #1236

Merged
merged 5 commits into from
Jan 15, 2023

Conversation

danirabbit
Copy link
Member

@danirabbit danirabbit commented Jan 14, 2023

Fixes #1232

  • Fix a binding that was inverted
  • Only set insensitive menuitems which are set from editconfig, not the whole menu

@danirabbit danirabbit requested a review from jeremypw January 14, 2023 01:35
Copy link
Collaborator

@jeremypw jeremypw left a comment

Choose a reason for hiding this comment

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

This addresses the tooltip and sensitivity issues mentioned. There is still something odd about the bindings (e.g. changing the tab width via the popover does not actually change the tab width whereas doing via the preference menu does). However best have a PR devoted to bindings.

When the tooltip is null, are the settings definitely from the app settings? We do not seem to honor Emacs and vim mode line comments in individual documents at present and there does not seem to be another way of having these settings individualized.
So is there any reason why a tooltip stating the source of settings when not editorconfig? Otherwise it is a bit confusing to sometimes have a tooltip and sometimes not.

@danirabbit
Copy link
Member Author

Yeah this might need a larger rework. It's got multiple things trying to touch these switches which seems bad.

Maybe? But it seems weird to have a tooltip that says something that is expected. I think it really only makes sense to provide an explanation for why user settings are being ignored. Thinking about it, a tooltip is probably not right for this anyways since it would be better to have an explanation next to the insensitive items

@danirabbit
Copy link
Member Author

Screenshot from 2023-01-14 11 48 55

@danirabbit danirabbit requested a review from jeremypw January 14, 2023 20:08
@jeremypw
Copy link
Collaborator

I think it debatable what is expected of the FormatBar, at least by a new user, as it can update depending on the document showing so appears to relate to the document not the app. The same is not true of the Preference menu, which is independent of the focussed document. Additional info in the popover to resolve the ambiguity is acceptable though.

Copy link
Collaborator

@jeremypw jeremypw left a comment

Choose a reason for hiding this comment

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

I'll approve this on the expectation that the binding problems mentioned earlier, particular with the indent spin button, will be addressed in a later PR (they were not introduced by this PR)

@jeremypw jeremypw merged commit 63167ea into master Jan 15, 2023
@jeremypw jeremypw deleted the formatbar-editorconfig-fixes branch January 15, 2023 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FormatBar tab button tooltip incorrect sometimes
2 participants