Closed andrewpbray closed 3 weeks ago
We do indeed add the .column-screen
class!
Are we adding it to the image itself, or just to the section? When I inject logging statements, it seems like we're not adding it to the image, but it's ending up there nonetheless... maybe I need to take another look!
EDIT: I'll keep the discussion over on #81 so I don't get us tangled, but I tentatively think it's not us! Will let you digest my thoughts over there before I go further though 😅
This isn't the solution to the problem, but while looking at the Lua I found this at the very bottom of the file
As far as I can tell, I don't think that's actually a function that we define?
I'm just recording that here for now.
With https://github.com/qmd-lab/closeread/pull/82/commits/f1eb9b24b1a197a5dc08a2d08fc24fd6e3555f6e, this is ready for review to merge in @andrewpbray! The change to propagate classes back is based on the similar Quarto code
Oh hey: since this was originally into main
, looks like we get that action:
https://closeread-pr.netlify.app/gallery/demos/sticky-blocks/
Looks like it's not fixed there...hmm... what's going on here.
Sidenote: sticky_blocks.qmd
showing up makes me think: do we want to showcase all of these tests as "Demos" or is there some tension there that would be better resolved using Demos for clear functionality vs some other form of less public test doc?
Oh hey: since this was originally into
main
, looks like we get that action:https://closeread-pr.netlify.app/gallery/demos/sticky-blocks/
Looks like it's not fixed there...hmm... what's going on here.
Are our actions deploying on push to a branch or on opening a PR into a branch? I'm not sure exactly when pull_request
actions fire with respect to a PR! We probably also don't want every PR opened into main
overwriting our published production docs either...
Sidenote:
sticky_blocks.qmd
showing up makes me think: do we want to showcase all of these tests as "Demos" or is there some tension there that would be better resolved using Demos for clear functionality vs some other form of less public test doc?
Mmm, I do wonder if we'd be better cordoning off tests. They could potentially stay on the site if it's easiest to keep them there (to take advantage of our current CI/CD), but maybe putting them in a separate category and labelling them as being for internal testing purposes is a good idea (once the work is fully merged in).
Have stopped going all the way up the DOM in https://github.com/qmd-lab/closeread/pull/82/commits/c9c6a9b673d6e3144c5ca6b4244e45b6144fb197. Returning to the sticky blocks demo, we do still have a problem. Our style stretching it across the screen is being overwritten by a more specific one from Quarto:
.page-columns.column-page-left .page-columns.page-full>*, // this is the one that's triggering
.page-columns.column-page-left>* {
grid-column: page-start/body-content-end;
}
I think the easiest way around this is probably just to set our CSS grid style as !important
, which should override just about anything Quarto sets regardless of the specific page layout Quarto is using. This will change as we decide how to accommodate sidebars, but I think it makes to evaluate whether to change this style as part of that work rather than here.
(When we merge this one, we should probably squash it! There's been a lot of back-and-forth in the commits 😅)
It feels like this is one of those rare cases when !important
really is called for!
In terms of whether sticky blocks should be a demo or a test, I agree with your thoughts there. If we don't cordon off tests, among other things, it will bloat the docs with stuff that users might be kinda like wtf on. How about this approach for testing (just spitballing...):
docs/tests
project.render["*.qmd", "!tests"]
to _quarto.yml
_quarto-tests.yml
file with project.render["tests"]
quarto publish
where we call quarto render --profile tests
.When the profile metadata gets merged in, hopefully the "tests" glob overwrites the "!tests" one?
🎉 🎉 🎉
Fixes #81