Readmore.js icon indicating copy to clipboard operation
Readmore.js copied to clipboard

Version 3.0 ToDos

Open jedfoster opened this issue 6 years ago • 4 comments

https://github.com/jedfoster/Readmore.js/tree/version-3.0

  • [ ] Tests?
  • [ ] Examples
    • [ ] Vanilla
    • [ ] jQuery (latest)
    • [ ] React
    • [ ] Riot
    • [ ] Vue.js
    • [ ] Angular
    • [ ] Next.js
  • [x] Validate package structure against...
    • [x] Yarn
    • [x] Rollup
    • [x] Babel
    • [x] Webpack
    • [x] Browser (<script src="/node_modules/readmore-js/dist/readmore.js"></script>)
  • [x] Investigate need for CSS prefixes on supported browsers (do we need -moz, et al?)
  • [x] Document new/changed APIs
  • [x] Evaluate #132 for adoption/inclusion. (Feature for controlling where toggle link is inserted—before/after block)
  • [x] Evaluate #140 for adoption/inclusion. (Stop expanding content if beforeToggle returns false)
  • [x] Evaluate #207 for adoption/inclusion. (Allow moreLink and lessLink options to use callbacks)
  • [x] Fill in destroy() method
  • [x] Refactor toggle() and constructor() to work with querySelectorAll
  • [x] Update README on master branch
  • [x] Evaluate #224 for adoption/inclusion
  • [x] Evaluate #225 for adoption/inclusion
  • [x] ~~Refactor toggle() to expose as a static method~~ Not sure of the utility of this; toggle depends on options which is an instance property.

jedfoster avatar Sep 24 '18 03:09 jedfoster

Re: tests,

Puppeteer looks promising. Decent tutorial on using it with Mocha: https://medium.com/@ankit_m/ui-testing-with-puppeteer-and-mocha-part-1-getting-started-b141b2f9e21

jedfoster avatar Sep 25 '18 05:09 jedfoster

transition is the only CSS property that would conceivably need to be prefixed, but http://shouldiprefix.com/#transitions says "No prefixes!" So, 🎉

jedfoster avatar Feb 23 '19 01:02 jedfoster

Great work on this @jedfoster. Been trying to integrate with a web component, but it doesn't seem to be fully working when using within shadowDom.

The general functionality works, but the use of document.querySelector causes a few problems...

The moreLink, for example, doesn't get replaced with lessLink on toggle.

Have you had any thoughts on supporting this being used within shadowDom?

olivercastle avatar Sep 12 '19 11:09 olivercastle

@olivercastle No, I hadn't even thought of using this in a web component, but that's a fantastic idea. Unfortunately, I have zero experience with that technology, and don't have any idea how to start.

Pull requests are always welcome.

jedfoster avatar Sep 12 '19 17:09 jedfoster