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

Add Conditional Formatting to Vuu Grids #223

Open
chrisjstevo opened this issue Sep 16, 2022 · 4 comments
Open

Add Conditional Formatting to Vuu Grids #223

chrisjstevo opened this issue Sep 16, 2022 · 4 comments

Comments

@chrisjstevo
Copy link
Contributor

No description provided.

@heswell
Copy link
Contributor

heswell commented Sep 16, 2022

I don't think we should be sending explicit styling instructions from the server to the client. When the user picks whatever styling effects they want to be associated with the filter criteria, we should create a custom css classname , store that classname in the layout json for this layout, together with the associated css styles and let the server know that this is the className to be applied to this row/column when they meet this set of filter criteria . The client would make sure sure when a layout is loaded, that custom classnames are injected into the loaded stylesheet, all ready to style any cells/rows with the associated classname.
The server just needs to send the associated classname(s) with rows/columns that meet the filter criteria.

One edge case I can imagine - what if a row meets multiple filter criteria that have styles associated with them ? Onus is going to have to be on user to make sure they don't look terrible.

WOuld be really nice to have a preview capability in the UI that user uses to set these, so they can anticipate this issue.

@chrisjstevo
Copy link
Contributor Author

I agree, so the UI would just send the class and the server would evaluate the criteria and return the class or not..?

Are you happy with how it would return the class?

I would say column trumps row in terms of precedence.

@heswell
Copy link
Contributor

heswell commented Sep 16, 2022

agree column before row.

If I'm going to save down the styling effects with the layout, we're going to have to start persisting layouts.
Rather than save down styling effects in layout, would probably be better, for this and other things like named filters, to have a mechanism to save settings that might span multiple layouts.

@chrisjstevo
Copy link
Contributor Author

I'll write up a file system storage version, will take 2 mins.

When do you feel you would store something outside of a layout? My feeling is you want everything in there in case you share it (filters and all) with someone else.

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

No branches or pull requests

2 participants