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

Narrative tables (md or html) need styling #887

Closed
1 of 2 tasks
jameshadfield opened this issue Feb 4, 2020 · 5 comments
Closed
1 of 2 tasks

Narrative tables (md or html) need styling #887

jameshadfield opened this issue Feb 4, 2020 · 5 comments
Labels
enhancement New feature or request good first issue A relatively isolated issue appropriate for first-time contributors narratives issues / PRs relating to narrative functionality please take this issue

Comments

@jameshadfield
Copy link
Member

jameshadfield commented Feb 4, 2020

(Moved out of #883 for clarity)

@emmahodcroft:

I currently can't seem to get tables (either Markdown or HTML) working in the auspiceMainDisplayMarkdown part working. This might be nice for formatting lists of links with images, for example. Or lists of previous situation reports (or other languages)

@jameshadfield:

I presume HTML tables don't work because of https://github.com/nextstrain/auspice/blob/master/src/components/narrative/MainDisplayMarkdown.js#L136 (this code was copied from the footer markdown parsing). If markdown tables don't work then there may be an option we can add to https://github.com/nextstrain/auspice/blob/master/cli/server/parseNarrative.js#L13 to improve this.

UPDATE: Thanks to @CameronDevine (#924) tables now display in auspiceMainDisplayMarkdown sections. These things are still needed:

  • The tables in auspiceMainDisplayMarkdown sections need to be styled appropriately
  • "Normal" (sidebar) narrative text should be able to display tables (low priority)
@jameshadfield jameshadfield added enhancement New feature or request narratives issues / PRs relating to narrative functionality labels Feb 4, 2020
@jameshadfield
Copy link
Member Author

To reproduce / work on a fix:

  • Install auspice from source, as per https://nextstrain.github.io/auspice/introduction/install or similar
  • Obtain example datasets + narratives via npm run get-data && npm run get-narratives
  • Add markdown tables to a narrative which is now present in ./narratives
  • Test via auspice develop --verbose

@CameronDevine
Copy link
Contributor

I was able to get tables in the auspiceMainDisplayMarkdown section working. However, I think some CSS work may also be necessary. As this is not my area of expertise, I will leave this work to someone else.

@CameronDevine
Copy link
Contributor

@jameshadfield Tables in the sidebar also work (This was working before #924). For example:

### Further Reading:

| test | table |
| --- | --- |
| 1 | 2 |
| 3 | 4 |

image

@jameshadfield jameshadfield changed the title Narrative tables (md or html) don't work Narrative tables (md or html) need styling Mar 13, 2020
@joachimschmidt557
Copy link
Contributor

I would be happy to work on styling tables.

@jameshadfield
Copy link
Member Author

Closed by #966 -- thanks @joachimschmidt557 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue A relatively isolated issue appropriate for first-time contributors narratives issues / PRs relating to narrative functionality please take this issue
Projects
None yet
Development

No branches or pull requests

3 participants