-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[Canvas] Adds workpad-level CSS #24143
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
Conversation
630614b to
bd7df74
Compare
💔 Build Failed |
|
@ryankeairns The position of the page looks a bit off on my end, and the checkered background also stretches and shrinks with the vertical space of the workpad. |
|
@cqliu1 I'll get that fixed up. Also of note, I couldn't find an easy way to apply the global styles to the page thumbnails. |
bd7df74 to
9c3cbdf
Compare
💚 Build Succeeded |
|
A couple more to-do items left here:
|
|
@cqliu1 regarding the 'Apply stylesheet' button, it's not as straightforward as I had anticipated and it's dissimilar to the other CSS Style argument panel in the sidebar. Workpad config (ie. workpad settings) is a It's a similar situation for the Page Manager preview, I can get the global styles to pass down into this section using |
|
@cqliu1 can you push up the changes from our zoom discussion (the preview styles and the 'apply stylesheet' button)? Thanks! |
|
@ryankeairns I did push up the changes upstream. Can you check if you're pulling upstream? |
9c3cbdf to
a58a6af
Compare
💚 Build Succeeded |
|
@alexfrancoeur @rashidkpc we put this global CSS feature on hold during the 6.5 frenzy, but it has now been rebased and is ready for your review. Thanks @cqliu1 for chipping in to finish this off! |
rashidkpc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few comments, but otherwise this looks pretty good!
x-pack/plugins/canvas/public/components/workpad_config/index.js
Outdated
Show resolved
Hide resolved
66024ad to
d165173
Compare
💚 Build Succeeded |
|
@rashidkpc your feedback has been addressed, this PR is ready for another look. |
💚 Build Succeeded |
rashidkpc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple comments, but take care of those and go ahead and merge this!
💔 Build Failed |
2b7d512 to
f53be6b
Compare
💚 Build Succeeded |
* adds global, workpad css styling feature * fixes checkered position and default CSS in textarea * adds global, workpad css styling feature * fixes checkered position and default CSS in textarea * Added global styles to page manager * Added 'apply stylesheet' button * fix after rebase * change style to css * move default workpad CSS class to constant * unwind the empty page color pieces
* adds global, workpad css styling feature * fixes checkered position and default CSS in textarea * adds global, workpad css styling feature * fixes checkered position and default CSS in textarea * Added global styles to page manager * Added 'apply stylesheet' button * fix after rebase * change style to css * move default workpad CSS class to constant * unwind the empty page color pieces
* adds global, workpad css styling feature * fixes checkered position and default CSS in textarea * adds global, workpad css styling feature * fixes checkered position and default CSS in textarea * Added global styles to page manager * Added 'apply stylesheet' button * fix after rebase * change style to css * move default workpad CSS class to constant * unwind the empty page color pieces



Fixes #23930
Summary
Similar to adding CSS overrides at a page level, this feature allows a user to override styles at a workpad (global) level using a new form input. This is my first foray into writing changes to the JSON workpad, so please kick the tires thoroughly.
One side effect of this change is that I've changed the default Page background to null and, in turn, moved the default white background up one element in the DOM. The reason for doing this was that setting a global background color for all pages seems like a prime use case for the workpad-level global CSS feature. Setting the default page color at the page level (deeper) prevents a user from overriding the color globally. Setting any background color at the Page level (including transparent) will take precedent - you can confirm with in full screen mode.
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.