fribbels / hsr-optimizer

A Honkai Star Rail optimizer, relic scorer, damage calculator, and various other tools for building and gearing characters
https://fribbels.github.io/hsr-optimizer/
MIT License
236 stars 44 forks source link

feat: make permutations sidebar and main menu sidebar responsive #347

Closed tiffanynwyeung closed 3 months ago

tiffanynwyeung commented 3 months ago

Pull Request

Description

Related Issue

Resolves #303

Checklist

Screenshots

Permanent fixed footer in action + reduced padding on menu items in main menu sidebar

image

Permutations sidebar/footer UI added to settings menu

image
fribbels commented 3 months ago

Nice! Testing it and its working pretty well.

To your point about the Sider's padding, it seems fine to me, I didn't notice a difference when playing around with it until I compared to a beta tab, so I doubt users would be too bothered.

Couple comments on the footer layout - I think the "permutations" number being missing is pretty important, since you might be locked into a 30 minute billion permutation search without realizing until its too late

Thoughts on something like this?

image

Also there seems to be some z-index funkiness going on in the grid. I remember I did some css on the z-index of the selected grid rows so we probably need to set the footer higher z than that

image

The breakpoint might be a few pixels too small. I'm getting a scrollbar before it breaks into the footer so there's a bunch of screen shifting at once

image

tiffanynwyeung commented 3 months ago

Couple comments on the footer layout - I think the "permutations" number being missing is pretty important, since you might be locked into a 30 minute billion permutation search without realizing until its too late Thoughts on something like this?

So I think it looks a little cluttered on the right hand side with all four buttons moved underneath Results, and the progress bar was very unnoticeable to me underneath the "Start Optimizer" button as the major CTA. I definitely don't mind re-adding permutations back in - maybe we can do something instead like moving Progress over to above the original Results column? We can also move the Stats view to the rightmost side as per your suggestion.

Also there seems to be some z-index funkiness going on in the grid. I remember I did some css on the z-index of the selected grid rows so we probably need to set the footer higher z than that

Noted, I'll fix that part 👍

The breakpoint might be a few pixels too small. I'm getting a scrollbar before it breaks into the footer so there's a bunch of screen shifting at once

The original plan I was hoping for was that, at that rough breakpoint, the Main Menu sidebar/Sider component would collapse on that breakpoint (while maintaining the ability for the user to uncollapse it, if they so choose) so the original Permutations sidebar could continue to be shown fully on the screen - only on the current breakpoint, where it's physically impossible to continue showing the permutations, would the footer be rendered. However, that would have to depend on https://github.com/ant-design/ant-design/issues/48884 being resolved.

So without the above behavior at the moment, I'm not too sure how users would feel being forcibly opted into a footer they may or may not like as a design choice, or even if they would rather opt back into scrolling over horizontally to the original sidebar to interact with it. Thus, I decided to choose the smallest possible breakpoint for it to render to 'minimize' the impact of this design change. Very open to more feedback about this though.

fribbels commented 3 months ago

Reviewed your code, and it looks good! Thank you for the idea and for following up with the implementation. The settings options are a nice touch for configurability