18F / omb-eregs

A tool to find, read, and maintain White House Office of Management and Budget (OMB) policy requirements
https://policy-beta.cio.gov/
Other
9 stars 9 forks source link

ID tag not auto-generating in M-17-12 #1054

Closed doc-mcconnell closed 6 years ago

doc-mcconnell commented 6 years ago

When new tags are created (, , etc.) in the AKN editor, id tags are not auto-computed. Without id tags, sections will not be saved properly and disappear when page is reloaded.

cmc333333 commented 6 years ago

Hey @doc-mcconnell , thanks for posting!

We tend to ignore the id tag, but I wonder if the emblem attribute (which gets incorporated into the id) is. That attr distinguishes all of whatever tag type in its parent (e.g. all of the paras that share a parent sec); if it's not present, the values are added incrementally -- which I suspect is causing a conflict. I suspect that a paragraph added at the beginning of a doc is getting an emblem of 1, then being followed by an existing paragraph with the same emblem, with the latter effectively replacing the former.

Regarding sections, you'll also need to provide a title attribute (and heading child) for everything to display correctly.

Does that all make sense?

doc-mcconnell commented 6 years ago

Yes, this is VERY helpful, thank you! I didn't realize I needed to specify an "emblem" attribute for the id to generate properly. And yes, the problem was occurring when I was moving text around and messing up the incremental values. Thanks for the response!