Skip to content
This repository was archived by the owner on Nov 17, 2021. It is now read-only.

Conversation

@nokome
Copy link
Member

@nokome nokome commented Feb 26, 2020

Testing, refinement and additions to extensions to achieve short term stability in the DOM structure to be targeted by CSS. As per (the new) README:

Some extensions perform manipulation of the DOM to make it more amenable to achieving a particular CSS styling e.g. adding a wrapping <div>s. For performance reasons these manipulations should be kept to a minimum. In some cases, it may be better to make the necessary changes to Encoda's HTML codec. In those cases the DOM manipulations in the extension should be commented as being temporary, and be linked to an issue in Encoda to make those changes permanent.

@alex-ketch I'll only do the DOM manipulations, feel free to make an CSS changes necessary from these changes.

Done:

  • Person names
  • Headings
  • Check affiliations
  • References

@codecov-io
Copy link

codecov-io commented Feb 26, 2020

Codecov Report

Merging #84 into next will increase coverage by 1.96%.
The diff coverage is 95.83%.

Impacted file tree graph

@@            Coverage Diff             @@
##             next      #84      +/-   ##
==========================================
+ Coverage   91.05%   93.02%   +1.96%     
==========================================
  Files           3        7       +4     
  Lines         123      172      +49     
  Branches       35       43       +8     
==========================================
+ Hits          112      160      +48     
- Misses         11       12       +1
Impacted Files Coverage Δ
src/extensions/person/index.ts 100% <100%> (ø)
src/extensions/headings/index.ts 100% <100%> (ø)
src/extensions/cite/index.ts 100% <100%> (ø)
src/util/index.ts 98.27% <93.33%> (-0.74%) ⬇️
src/extensions/cite-apa/index.ts 100% <0%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update eddec64...70f69c3. Read the comment docs.

@nokome nokome requested a review from alex-ketch February 27, 2020 02:11
Copy link
Collaborator

@davidcmoulton davidcmoulton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks interesting and useful 👍 Left a few comments / questions. Might have more questions when using it in anger once it's in next, but cross that bridge later.

Copy link
Collaborator

@alex-ketch alex-ketch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've got some questions re. the Person encoding changes, and would like to see the type casting removed please.

@nokome
Copy link
Member Author

nokome commented Feb 29, 2020

Thanks for the comments. I've done a round of changes. Please have another quick check and merge if happy.

Using `document.readyState !== 'loading'` is preferable because in both `interactive` and `complete` states the DOM is ready to be manipulated. See https://developer.mozilla.org/en-US/docs/Web/API/Document/readyState
Copy link
Collaborator

@alex-ketch alex-ketch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor typo, but otherwise looks good.
Thanks for making the changes @nokome 🙇

Co-Authored-By: Alex Ketch <[email protected]>
@nokome nokome merged commit 4a8b0ea into next Mar 2, 2020
@nokome nokome deleted the 71-structure branch March 2, 2020 23:15
@stencila-ci
Copy link
Collaborator

🎉 This PR is included in version 1.11.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants