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

feat: collapse license text by default #2636

Merged
merged 1 commit into from
May 17, 2024

Conversation

mstykow
Copy link
Member

@mstykow mstykow commented May 17, 2024

Summary of changes

  • prevent license text from taking up vertical space by introducing toggle button to show/hide it
  • rename "package" to "component" for OSS naming consistency
  • make sure icon button keyboard-focus style is separate from click-focus style

image

Context and reason for change

User feedback on smaller screens revealed that we are unnecessarily taking up vertical space which forces frequent scrolling to see comments.

How can the changes be tested

Try the new toggle button with and without changed license texts.

@mstykow mstykow force-pushed the collapse-license-text-by-default branch from 2c5c55f to 5fd6428 Compare May 17, 2024 15:33
- prevent license text from taking up vertical space by introducing toggle button to show/hide it
- rename "package" to "component" for OSS naming consistency
- make sure icon button keyboard-focus style is separate from click-focus style

Signed-off-by: Maxim Stykow <maxim.stykow@tngtech.com>
@mstykow mstykow force-pushed the collapse-license-text-by-default branch from 5fd6428 to b37a4b3 Compare May 17, 2024 15:49
Comment on lines +98 to +104
<Badge
anchorOrigin={{ vertical: 'bottom', horizontal: 'right' }}
color={'info'}
variant={'dot'}
invisible={!packageInfo.licenseText}
>
<NotesIcon />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Subjective: I think it could also be nice to just give the color to the Icon, instead of adding a badge. But go with what you think is best.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i tried color first but that's not how the MUI toggle button is designed: it will only display the color once it's active

@mstykow mstykow merged commit f078ab4 into main May 17, 2024
5 checks passed
@mstykow mstykow deleted the collapse-license-text-by-default branch May 17, 2024 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants