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

Reduce size taken by grade chips in activity tables #6668

Merged
merged 1 commit into from
Sep 10, 2024
Merged

Conversation

acelaya
Copy link
Contributor

@acelaya acelaya commented Sep 10, 2024

In #6666 we added a grae column to the students activity table, which renders a grade chip component that makes rows slightly taller than they were before due to the implicit padding in table cells.

This PR adds a bit of negative margin around the grade chip to compensate for that and make rows have the same height they had before.

This is the height of a row without grade column:

image

This is the height when the grade chip is included, before applying the changes from this PR:

image

And this is how it looks with the changes from this PR:

image

I added the smallest possible margin, which is enough so that a single line of text in any of the other cells is taller.

Bigger margins would not make a difference here, unless the rest of the cells were empty.

I considered implementing something in frontend-shared, that allows customizing the cells padding, but I think this should do for now and we can improve on that if we find more use cases where the padding needs to be adjusted on a per-cell basis.

@acelaya acelaya merged commit 26ae6da into main Sep 10, 2024
9 checks passed
@acelaya acelaya deleted the grade-chip-margin branch September 10, 2024 09:58
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