Conditionally disable reset layout button#1948
Open
victorlin wants to merge 3 commits intovictorlin/fix-entropy-resetfrom
Open
Conditionally disable reset layout button#1948victorlin wants to merge 3 commits intovictorlin/fix-entropy-resetfrom
victorlin wants to merge 3 commits intovictorlin/fix-entropy-resetfrom
Conversation
To be used in a future commit.
This button is a single tab, not part of a tab group.
Comment on lines
+515
to
+516
| case types.CHANGE_ZOOM: // this is the entropy panel zoom | ||
| return {...state, zoomMin: action.zoomc[0], zoomMax: action.zoomc[1]}; |
Member
There was a problem hiding this comment.
I remember disabling this as it caused bugs, or maybe unnecessary renders, but I can't remember the specifics and 2a063a7 doesn't spell them out either. I'll do some more testing when the PR's ready to go!
Member
There was a problem hiding this comment.
or maybe unnecessary renders
This is it I think. With these changes we now trigger two calls to update rather than one. The first has no zoom information, the second sets min/max to the overall zoom bounds. (Sometimes three calls, but my suggested changes in #1947 will limit it to two calls.)
I don't think this is blocking, although would be worth spending a small amount of time to see if the logic can be improved so there's only one update call.
Render this button useless when the view is not zoomed.
2cbc1fd to
e23e929
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description of proposed changes
Render this button useless when the view is not zoomed.
Related issue(s)
Follow-up to #1684 (comment)
Checklist