Skip to content
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

Merged
merged 7 commits into from
Feb 27, 2025
Merged

refactor: layout components #1868

merged 7 commits into from
Feb 27, 2025

Conversation

setchy
Copy link
Member

@setchy setchy commented Feb 27, 2025

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".

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>
@github-actions github-actions bot added the refactor Refactoring of existing feature label Feb 27, 2025
@setchy setchy added this to the Release 6.2.0 milestone Feb 27, 2025
@@ -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;
Copy link
Member Author

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

Copy link
Collaborator

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.
Copy link
Member Author

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>
@setchy setchy merged commit 7541769 into main Feb 27, 2025
14 checks passed
@setchy setchy deleted the refactor/layout-components branch February 27, 2025 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Refactoring of existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants