-
Notifications
You must be signed in to change notification settings - Fork 266
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: layout components #1868
Conversation
Signed-off-by: Adam Setch <adam.setch@outlook.com>
Signed-off-by: Adam Setch <adam.setch@outlook.com>
Signed-off-by: Adam Setch <adam.setch@outlook.com>
@@ -20,7 +20,7 @@ export const Checkbox: FC<ICheckbox> = ({ | |||
visible = true, | |||
...props | |||
}: ICheckbox) => { | |||
const counter = props.counter > 0 ? props.counter : undefined; | |||
const counter = props?.counter === 0 ? '0' : props.counter; |
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.
When 0
is left as a number, it will not be rendered within the counter label correctly
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.
Sounds painful to figure out.
Worth leaving this as a code comment?
* similar to CounterLabel from @primer/react but with customizable styling. | ||
* | ||
* Created due to odd behavior with CounterLabel: | ||
* - would show screen vertical scrollbar which is undesirable. |
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.
literally hours to figure this out 😭
Signed-off-by: Adam Setch <adam.setch@outlook.com>
Signed-off-by: Adam Setch <adam.setch@outlook.com>
Signed-off-by: Adam Setch <adam.setch@outlook.com>
Signed-off-by: Adam Setch <adam.setch@outlook.com>
|
Refactor some layout components
And importantly, fix our vertical scrollbar regression on Filters, caused by the primer CounterLabel component, which only occurred in certain states. tldr; that took hours to triage and find. 😅. Solution was to create a custom component which solved a few other gaps. Left some comments for future maintainers/contributors to understand "why".