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

Sort out page break UI #146

Open
pcraig3 opened this issue Jan 7, 2025 · 1 comment
Open

Sort out page break UI #146

pcraig3 opened this issue Jan 7, 2025 · 1 comment

Comments

@pcraig3
Copy link
Collaborator

pcraig3 commented Jan 7, 2025

Okay so there are 2 ways of doing page breaks in the NOFO Builder.

  1. There is a radio button in every subsection edit page “Has page break?”
  2. In the body of any subsection, you can write page-break-before and page-break-after. These are special strings that create a page break in the PDF.

Here are 3 screenshots of our page break stuff.

editing a subsection nofo edit page Nofo HTML page
Image Image Image

When page breaks are created, there is a dashed line that appears in the UI, because otherwise you wouldn’t be able to tell where they were. Some of them also say that they are a page break. They should all look like this. The dashed line on its own is not obvious enough.

Also the ‘before/after’ stuff is mostly a distinction without a difference. It does make a difference when it is attached to an element (eg, should everything after a table be on a new page, or should the table start on a new page), but when it is just an <hr> basically, it makes no difference.

So there’s a few things to do here:

Add page-break

Let’s make “page-break” work the same as “page-break-before”. This is what we do with the radio button so let's just make this the same in the body text.

Function is here:

def convert_paragraph_to_searchable_hr(p):

We don’t need to remove the logic/CSS for “page-break-before” or “page-break-after”, let’s just keep them around. They are in old NOFOs so if we remove them some layouts will get messed up.

Also change this documentation (note: non-public link): NOFO Builder Secret Codes.

Remove “-before”/“-after” language in the UI

Let’s just call it “page-break” and have a little down arrow (or no arrows, but I kind of like them).

Add “[ page break ]” pseudo element to the section page break UI

People don’t know what the dashed line actually means on its own, so let’s add this. Again, we don’t need to specify “before” or “after”.

We want to add this in 2 places (see images above):

  • On the edit page
  • In the NOFO Builder HTML UI
@pcraig3
Copy link
Collaborator Author

pcraig3 commented Jan 18, 2025

This issue is also relevant to this ticket: #178

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

1 participant