-
Notifications
You must be signed in to change notification settings - Fork 2
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
refactor label.js out of existence #452
Comments
Random thought: this might end up somewhat differently - label and title could just create spans with respective data-ams-doc and parents create wrappers and recurse title and label with those. |
Moves label handling to ref.js. - label.js - remove case "ref" (i.e., passThrough) - ref.js - replace recurseTheDom with passThrough Part of #452
Moves caption.js into fig.js and simplifies label.js - transformer.js - remove caption.js import /integration - (re)move caption.js - now handled in fig.js - fig.js - if label or caption, create figcaption - if label, create strong element (sames as caption.js) - if caption, pass through with figcaption - label.js - remove caption handling Part of #452
Moves label logic from label.js to fn.js - fn.js - add label creation logic from label.js - label.js - remove fn handling Part of #452
fn is somewhat of a wrench - it injects a sup element inside the "typical" label span. This will make the idea from the previous comment a bit harder - unless we move sup-creation downstream (or even upstream). |
For the record, the tags of label parents:
|
disp-formula doesn't really need a figcaption wrapper around the label (or a figure for that matter). |
To quote #457 (comment)
Similarly, ideally, we'd have label and title just create spans with their respective data attributes and find a smooth pattern to handle any re-organization in the parents. |
On a related note, in fig.js, we map label to strong (via passthrough); that's really not necessary, semantically speaking but it would be a breaking change. (A generic label mapping would still need to be moved/redirected to the figcaption.) |
After too much additional research, it's tempting to "just" reduce this to the case where we generate the heading. But that would be lazy - I'd prefer to reflect the complexity of the content here so there are no fewer surprises down the line. Just to recap the parent elements
|
An update
This leaves
|
From #451 (comment)
The text was updated successfully, but these errors were encountered: