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

Add a read-more directive #23

Open
chrisjsewell opened this issue May 18, 2020 · 2 comments
Open

Add a read-more directive #23

chrisjsewell opened this issue May 18, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@chrisjsewell
Copy link
Member

chrisjsewell commented May 18, 2020

As discussed in https://github.com/executablebooks/tcs_to_jb/issues/3, It would be good to have a component like:

.. read-more::

    Here's some text which will end with the clickable ellipses

    +++

    Then here's the hidden text, which will exand below on clicking the ellipses

This component could be visualised in a number of "styles":

  1. As a progressive disclosure, akin to https://primer.style/design/ui-patterns/progressive-disclosure#ellipsis-icon (an example implementation is http://jsfiddle.net/s2hmvg7o/)

  1. As a call out, akin to http://www.bigfootjs.com/
  2. As a side note like:

image

@choldgraf
Copy link
Member

choldgraf commented May 18, 2020

Is there a reason you imagine this as a directive vs. as a role? I imagined syntax along the following:

here's my paragraph content, and either a read more tooltip in-line {rm}`like this`, or after the
paragraph content finishes, there could be a readmore tag at the end like so.
{rm}`Here's my longer readmore text, links etc at the end`

My thinking there was that, as you suggested in https://github.com/executablebooks/tcs_to_jb/issues/3, this would be best for short extra bits of information, while longer bits of content (that would warrant multiple lines and a directive) would be more suited for something like an "aside" in the margin

@chrisjsewell
Copy link
Member Author

chrisjsewell commented May 18, 2020

No this directive is for the long form content, not the tooltips.
Although I mention the three styles, really I think this directive is most suited to (1), whereby you can have an arbitrarily long section of text. As you mention (2) and (3) are probably only really suited to short amounts of text (single paragraph).
Perhaps there could be a separate directive/role for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants