-
Notifications
You must be signed in to change notification settings - Fork 1
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(parameter-pane): implement the new parameter pane #82
Conversation
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.
The style is broken. cc: @LorenzoValentine
What do you mean by 'the style'? Do you mean that when reducing the horizontal distance of the browser, the simulation area will block the parameter pane? |
src/components/ParametersBar.tsx
Outdated
function ShowHideButton(props: { | ||
isVisible: boolean, | ||
setVisible: (inp:boolean)=>void, | ||
}) { | ||
const isVisible = props.isVisible | ||
const setVisible = props.setVisible | ||
|
||
return( | ||
<BackButton onClick={() => setVisible(!isVisible)}> | ||
{isVisible ? (<DoubleLeftOutlined />) : (<DoubleRightOutlined />)} | ||
</BackButton> | ||
) | ||
} |
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.
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.
buttons should now be roughly the same height now
other services like discord seem to use a similar font size for their labels and tooltips. personally, i'm okay with the size of the tooltips, making them smaller could reduce readability. thoughts? @LorenzoValentine |
new changes remove the component list idea and just conditionally renders each category. should hopefully fix any issues with |
@peipacut, as you are now working on the parameter pane, could you run formatting in |
But from your screenshot, the original text in Discord has a bold effect, this is different from the tooltips. |
latest push should resolve formatting issues. as for the tooltips, they weren't initially bold on my end but hopefully the extra styling I added should force the tooltip text to always be unbold. |
I believe his meaning is that the original text should be different with tooltip's (in format) |
Signed-off-by: Bill ZHANG <[email protected]>
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.
ESLint found more than 10 potential problems in the proposed changes. Check the Files changed tab for more details.
decided to go with a slightly different design for categories
original design docs for reference
Currently, this PR doesn't animate hiding the parameter pane, though I don't think that should be a priority at this point.
With the code in this PR, we can introduce new parameter categories as separate function components. We can then add those components to the array in
getAllCategories
and specify whether it is an easy or expert mode option with an enum bitmask.When reviewing, please check the way I'm selectively rendering different categories, namely the
filterOnDifficulty
andgetAllCategories
functions. I'm not sure if my method is best practice.closes #41