-
Notifications
You must be signed in to change notification settings - Fork 328
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
Refactor branch menu #518
Refactor branch menu #518
Conversation
…into refactor-branch-dropdown
@telamonian thanks for posting on this. See L204 of components/Toolbar.tsx Otherwise this is good for me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly looks great! A few non-issues with docstrings and aria stuff. Also, the new branch dialog does not look right in dark mode (note the scrollbar):
I pushed a commit that adds the broad strokes in for dark mode by setting appropriate color
and background-color
in a couple of places:
You'll still need to tweak the style a bit to get it right (eg the branch icons have the wrong color, there's some strange white lines, etc).
There's also some styling defects related to the file list scrollbar. I played around with it a bit, and it seems like the right fix will be to prune/combine some existing DOM elements and then re-layout the top level components of the panel using display: flex
and flex-direction: column
. This will be a bit complex and the styling problem is minor, so I'm content to leave this for a future PR (it's also possible that #521 will help with the file list styling).
So, in summary:
- docstring fixes
- remove the two aria attrs
- fix the dark theme styling for the new branch dialog
- as per @fcollonval's comment, since the current repository button doesn't do anything right now, it shouldn't look/act like a button
and then the PR should be good to go!
@kgryte Well said, and the benchmarks provide a convincing object lesson. Thanks for doing those. Overall this has been a surprisingly instructive PR. It's been nice to see some typescript written with a different perspective/idiom from what I'm used to. In the benchmarks, are the trivial conditionals:
just there to ensure that the loop contents don't get optimized away? |
@telamonian Re: checks. That is correct. In this case, the goal would be to thwart "intelligent" compilers from skipping ahead to the last In general, however, when timing within loops, conditional checks are commonly necessary to prevent loop-invariant code motion, dead code elimination, and constant folding/propagation optimizations. It is also why an additional check outside of the loop is necessary in order to prevent the entire loop from being optimized away. In this particular example, I used |
@telamonian I have
I believe this resolves the remaining issues. |
NM, classes is already in the file |
@telamonian It is already imported: cac88a5#diff-f3df9dfa36cc17388ea613f8e3916891L2 |
cac88a5
to
f75c2a6
Compare
Other two commits? I have no idea what you're talking about |
@telamonian Must have been dreaming. ;) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Let's get this sucker pulled in
@telamonian Hurray! Thanks for reviewing! |
This PR resolves #513 and #514 by
typestyle
naming conventions.Demos
Normal staging:
Simplified staging:
Notes