-
Notifications
You must be signed in to change notification settings - Fork 8
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
Custom text & anchor support for Mapping Table Column #2531
Comments
In terms of sorting and grouping is this a mapping column with hyperlink text decoration or a hyperlink text column with mapping decoration? I'm guessing it's more of the former, i.e. the state represented by the icon is the interesting thing to sort and group by and the hyperlink text is metadata. |
I agree, for the systems table use case, I think it makes much more sense to group by the icon state (jobs which are in progress / completed / failed / etc) than by the text mentioning which job / the progress status. The same philosophy would be applied to sorting. I imagine this would also apply to other use cases as well. @TJ-G |
Chatted with @atmgrifter00 and @jattasNI about what the API would look like and the proposal is:
Alternatives:
Sounds like @atmgrifter00 plans to make an HLD proposal for the new column type next. |
Yeah, my proposal is to not include |
# Pull Request ## 🤨 Rationale The impetus for #2531 was performance issues due to creating a mapping element for each row of table data. We should explicitly suggest not doing this. ## 👩💻 Implementation Added usage guidance to the table column mapping story. ## 🧪 Testing Inspect storybook build ## ✅ Checklist <!--- Review the list and put an x in the boxes that apply or ~~strike through~~ around items that don't (along with an explanation). --> - [x] I have updated the project documentation to reflect my changes or determined no changes are needed. --------- Co-authored-by: Milan Raj <[email protected]>
🙋 Feature Request
😯 Problem to Solve
The Systems grid on SLE currently has 2 columns for rendering the job status of a system: an icon column and an anchor text column:
The current implementation for the icon column is to use the existing mapping table column. A mapping is done for each system row, so the system id is essentially used as a key. This allows us to have a different tooltip for each system depending on its status. However, this approach has heavy performance issues when the table has 1000 rows and the entire column is populated:
Using the performance tools of Google Chrome we notice that the heavy operation is coming from the table, after the column map is changed:
💁 Proposed Solution
textFieldName
(or a similar property) that would allow providing a custom text for the column. It would look something like this:With this approach, the mapping icons would be fixed (the fixed set of possible icons) and only the tooltip text would be given dynamically by a different property of the row.
Moreover, the desire on the systems table is to unite those two columns into one. This would also require another property on the mapping column to allow an URL to be specified, which the Systems table would use to populate with the job details URL for each job status. This would make the text that is displayed next to the column to be clickable and link to the job details page.
📋 Tasks
The text was updated successfully, but these errors were encountered: