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

[atable] added background gradient to rows with changed content in atable #212

Merged
merged 9 commits into from
Jan 27, 2025

Conversation

crabinak
Copy link
Collaborator

@crabinak crabinak commented Dec 5, 2024

@agritheory I added the light blue gradient effects to rows that have changed cell content.

One note is that on pinned columns, there isn't a way to have a row's background override a cell's background with its own gradient (pinned cells need a background color to hide non-pinned content scrolling below it), so for that situation, I have the pinned cells use a solid light blue background color while the rest of the row continues the gradient as normal.

@Alchez I had to modify how the classes are applied to the cell in Acell since it now conditionally checks for pinned and cellModified, so I moved that logic into a computed property. Let me know if that causes any issues.

image

@crabinak crabinak requested a review from agritheory December 5, 2024 17:54
Copy link
Contributor

github-actions bot commented Dec 5, 2024

Coverage Report for ./atable

Status Category Percentage Covered / Total
🟢 Lines 71% (🎯 70%) 169 / 238
🟢 Statements 71.6% (🎯 70%) 179 / 250
🟢 Functions 81.25% (🎯 70%) 39 / 48
🔴 Branches 49.43% (🎯 70%) 87 / 176
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
atable/src/components/ACell.vue 90.9% 60.71% 100% 90.74% 107, 130-133, 163, 171-173
atable/src/components/AExpansionRow.vue 0% 0% 0% 0% 33-3
atable/src/components/ARow.vue 58.33% 56.25% 50% 58.33% 50-64, 17
Unchanged Files
atable/src/utils.ts 100% 100% 100% 100%
atable/src/components/ATable.vue 59.25% 37.5% 90.9% 58.49% 112-116, 126-154
atable/src/components/ATableHeader.vue 100% 57.14% 100% 100%
atable/src/components/ATableModal.vue 90% 75% 50% 90% 49
atable/src/stores/table.ts 75% 51.47% 84.21% 74.72% 39-40, 53, 84-85, 105-109, 132, 136-147, 174, 182-183, 189
Generated in workflow #524 for commit 74f2707 by the Vitest Coverage Report Action

@agritheory
Copy link
Owner

@crabinak I think it's a little bit too much on the left and not enough on the right. I tried experimenting with this briefly enough to know I'm out of my depth, but found a potential solution on SO

@crabinak
Copy link
Collaborator Author

crabinak commented Dec 9, 2024

@agritheory I added some control in the style to adjust the lightness of the start and end colors for the gradient. I think the start value for the cell-changed blue is now 80% and the end is 40% (the values in the CSS are percentages of white added).

@agritheory agritheory changed the title added background gradient to rows with changed content in atable [atable] added background gradient to rows with changed content in atable Dec 13, 2024
@crabinak
Copy link
Collaborator Author

@agritheory Latest update here, the changed cells now have a black border, bold and italic text (might be too much), and the background of the cell is a slightly darker version of the cell-changed color.

@agritheory
Copy link
Owner

@crabinak The border on the changed cell is too much I think. And I think that you were right before about the italics + bold and no background color on cell as the best way to communicate the data has changed. I would like to preserve the cell color change API, it might be a better UX in some cases. CC @Alchez

@crabinak
Copy link
Collaborator Author

@agritheory Should the background gradient be removed or kept?

@agritheory
Copy link
Owner

@crabinak I like it, but I don't think it makes sense in all cases. When you're in a scenario where there a lot of columns / horizontal scrolling I think it's a good choice; we have a good use case for this and will implement it there.

@crabinak
Copy link
Collaborator Author

@agritheory I updated so now modified cells just become italic and bolded. I included separate classes for cell highlighting (cell-modified-highlight) and row highlighting (changed-row-gradient) that can be applied for the cell and row highlighting where needed.

@agritheory agritheory merged commit cd63586 into development Jan 27, 2025
4 of 5 checks passed
@agritheory agritheory deleted the feat-atable-gradient-cell-change branch January 27, 2025 15: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