datatracker icon indicating copy to clipboard operation
datatracker copied to clipboard

feat: Use bs5 for htmlized doc

Open larseggert opened this issue 2 years ago • 13 comments

This gets rid of a bunch of old code by re-using document_main to render htmlized docs into a new set of bs5-based templates.

Also fixes #4057 and #3653.

This depends on https://github.com/ietf-tools/rfc2html/pull/11 and https://github.com/ietf-tools/rfc2html/pull/12.

larseggert avatar Jun 14 '22 15:06 larseggert

This is a pretty big change of what's really the most heavily fetched format from the datatracker. We may want to phase this in? (and possible fix the html brokenness in rfc2html at the same time).

As mentioned out of band, when I first moved this to the datatracker, I didn't preserve the colored header and got immediate feedback that people wanted it back.

Please look at #3466.

rjsparks avatar Jun 17 '22 14:06 rjsparks

I'm adding the colored header - as a colored badge.

larseggert avatar Jun 17 '22 15:06 larseggert

We may want to phase this in?

We should definitely deploy on sandbox first and ask for feedback.

larseggert avatar Jun 20 '22 10:06 larseggert

@rjsparks should we chat about how to make this available for community feedback?

larseggert avatar Jul 18 '22 13:07 larseggert

We can do a deployment of the branch on the sandbox server using a new DNS name (such as htmlize-preview.ietf.org), or you could look at rewiring the PR to put this htmlization at a different endpoint than the current, so that they are both available in production for some time (/doc/htmlpreview/ perhaps). If we go with deploying the branch, it would be good to keep it close to main.

rjsparks avatar Jul 21 '22 17:07 rjsparks

~~I'll look I to adding another button for deployment testing via main.~~

Actually, it will require a lot of work to rework the PR for that. I think deploying the branch is easier. We can also first get some initial feedback during the codesprint.

larseggert avatar Jul 22 '22 03:07 larseggert

@rjsparks I think this is ready for you to take a look (htmlization and pdfization of various documents). If you think it's ready, maybe we do public testing?

larseggert avatar Aug 23 '22 08:08 larseggert

@martinthomson the recent CSS changes don't work in the Weasyprint PDFization: Screen Shot 2022-08-31 at 12 50 07

larseggert avatar Aug 31 '22 09:08 larseggert

Ugh, that's clearly a lack of CSS grid support.

I do have to ask why you are feeding this stylesheet in for printing to PDF though. Isn't the regular style sheet better for that?

martinthomson avatar Sep 01 '22 00:09 martinthomson

Because so far, the htmlized text was pdfized by the datatracker. Maybe that should change. I think the RFC Editor pdfizes the html?

larseggert avatar Sep 01 '22 04:09 larseggert

Hmm, I can maybe try to use @supports to provide some fallback styling (which won't look like the original). Or you can do what rfc-editor.org does. For example: https://www.rfc-editor.org/rfc/rfc9261.pdf

martinthomson avatar Sep 01 '22 07:09 martinthomson

The latter probably makes most sense - @rjsparks any preference here?

larseggert avatar Sep 01 '22 07:09 larseggert

I think you're getting confused between pdf output from xml2rfc v3 and pdf of htmlized documents. Martin is pointing to v3 pdf output with his link above.

As with most places where we have confusion across the v3 boundary wrt -ized documents, we need to consider whether people will expect the fundamental structure of what they're getting back to be the same for pre-v3 and post-v3 documents. For the endpoints that advertise themselves as -ized, I think they should return the same kind of thing.

rjsparks avatar Sep 01 '22 14:09 rjsparks

Moving this into a branch at ietf-tools to assist with a feedback deployment

rjsparks avatar Sep 13 '22 19:09 rjsparks