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

WIP: Implement table fragment using markdown #565

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mpourismaiel
Copy link
Member

@mpourismaiel mpourismaiel commented May 10, 2019

What this PR does / why we need it:

Prototype of what a markdown table fragment would look like.

This implementation mimics the design and behavior of the frontmatter table fragment through the usage of shortcodes and search and replace through the html code of the markdown table. It's a really rough implementation right now but it's functional and gives a good idea of how this idea would proceed.

The good thing about this implementation is 1) this code can be moved to the table helper and every fragment using .Content can make use of it and 2) shortcodes are here. Using shortcodes in table has the advantage of allowing the user to use different data types along side each other, for example a button along an icon. Also 3) the old implementation of table fragment (table helper, frontmatter table) doesn't need to be removed.

If you have any suggestions please let me know.

  • table fragment
  • table helper
  • item fragment
  • content fragment

Screenshots:

image

image

Which issue this PR fixes:
fixes #399

Release note:

Only table fragment is implemented right now.

- table, content, item: 

#title_align = "left" # Default is center, can be left, right or center
+++

| Header 1 | Header 2 | Header 3 | Header 4 | Header 5 | Header 6 |
Copy link
Member

Choose a reason for hiding this comment

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

markdown table code breaks after render:
Screenshot_2019-05-13 Table middot; Okkur - Syna

Copy link
Member

@stp-ip stp-ip left a comment

Choose a reason for hiding this comment

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

  • make normal tables work in css only
  • add syna table shortcode that enables replacement to make the table responsive

@mpourismaiel
Copy link
Member Author

The syna table shortcode is hard to pull off. I managed the css only table with a bit of hacking around, doing the syna shortcode is harder though. I've experimented a bit with partials and shortcodes and did a bit of hacking with them and have an idea on how to do this but I think I'm overthinking it. I'll try to work on it again tonight. If you have any ideas on this please let me know.

@stp-ip
Copy link
Member

stp-ip commented Aug 31, 2019

Anything that is still WIP here? Or good for a final review?

@stp-ip
Copy link
Member

stp-ip commented Dec 1, 2019

Ping ;)

@ghost
Copy link

ghost commented Dec 1, 2019

DeepCode Report (#c5184f)

DeepCode analyzed this pull request.
There are no new issues.

@mpourismaiel
Copy link
Member Author

I forgot about this PR. It's in WIP because I can't prevent the shortcode from rendering the code block and it's problematic. We can merge the PR and just go with it but I rather use the frontmatter table for now instead of messing the demo.

@mpourismaiel
Copy link
Member Author

The new markdown compiler might help. Let me go through it.

@stp-ip stp-ip added the revisit label Dec 4, 2019
@stp-ip
Copy link
Member

stp-ip commented Jul 21, 2020

Now with the ability to create our own inline shortcodes could we come up with a better table usage?
Keeping it open as our current table fragment is not good. We should deprecate it and use markdown tables, that are well designed.

@orchid00
Copy link

this will be very helpful @stp-ip would it be implemented?

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

Successfully merging this pull request may close these issues.

[Discussion] Deprecate table
3 participants