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

Timeline snippet #3194

Closed
wants to merge 1 commit into from
Closed

Conversation

5e-Cleric
Copy link
Member

@5e-Cleric 5e-Cleric commented Dec 17, 2023

You can see the snippet in this brew: https://homebrewery.naturalcrit.com/share/VF33QNkUHuWJ
It is a bit dated, as i get a deployment i will post a real example.

ToDo:

  • Units to cm or mm
  • Simplify Syntax

@5e-Cleric 5e-Cleric mentioned this pull request Dec 17, 2023
16 tasks
@calculuschild
Copy link
Member

I'm not opposed to adding a timeline like this, even if it doesn't match an existing PHB styling.

However I am concerned about the sheer size and complexity of the Markdown and CSS here (~200 lines of CSS!). Compared to our current "most complicated" element, the Monster Stat block is only 80 lines of CSS.

Let me add a deployment for this though and maybe we can find ways to simplify this down. I also wonder if maybe this would be better suited as a Mermaid feature.

@calculuschild calculuschild temporarily deployed to homebrewery-pr-3194 December 17, 2023 22:23 Inactive
@5e-Cleric
Copy link
Member Author

I understand your concerns, although i am more concerned with the markdown syntax than the CSS involved, which isn't much, all things considered.

The biggest problem is that all calculus is done via CSS, which means the snippet needs to have inline CSS to establish the position inside the timeline, therefore we need curly spans or blocks for each element inside.

The amount of CSS comes from two places, one, making every event have text, an icon(after element) and the date(before element), and the ability to make it vertical.

Also because of the three types of elements you can add inside, events, ranges and points.

I did go a little bit crazy with customization, although i did remove variables i was using which were innecessary.

@5e-Cleric
Copy link
Member Author

Question, if this was implemented via mermaid.js, what would syntax look like?

@ericscheid
Copy link
Collaborator

Question, if this was implemented via mermaid.js, what would syntax look like?

https://mermaid.js.org/syntax/timeline.html

```mermaid
timeline
    title History of Social Media Platform
    2002 : LinkedIn
    2004 : Facebook
         : Google
    2005 : Youtube
    2006 : Twitter
```

See also mermaid-js/mermaid#2268

@5e-Cleric
Copy link
Member Author

random thought, maybe if i made the :after element to be a background image (svg) in the element itself, or the :before`, i could get this down...10 lines or so, will get a crack at it later.

@5e-Cleric 5e-Cleric added the 🔍 R1 - Reviewed - Needs Discussion 💬 PR not okayed yet; needs reevaluation or closure label Dec 23, 2023
@dbolack-ab
Copy link
Collaborator

random thought, maybe if i made the :after element to be a background image (svg) in the element itself, or the :before`, i could get this down...10 lines or so, will get a crack at it later.

Any luck with that?

@5e-Cleric
Copy link
Member Author

Any luck with that?

Actually no, tried, but hit some problems, would have to refactor the entire thing to do that, and probably have to deal with more, not less css

@5e-Cleric 5e-Cleric mentioned this pull request Jan 10, 2024
@calculuschild calculuschild temporarily deployed to homebrewery-pr-3194 January 17, 2024 17:22 Inactive
@calculuschild calculuschild temporarily deployed to homebrewery-timeline-sn-tb4dty January 18, 2024 16:50 Inactive
@calculuschild calculuschild temporarily deployed to homebrewery-pr-3194 January 18, 2024 20:04 Inactive
@calculuschild calculuschild temporarily deployed to homebrewery-pr-3194 January 18, 2024 20:07 Inactive
@Gazook89
Copy link
Collaborator

My two cents: I don't see timelines as a commonly requested feature, nor very many timelines in the (admittedly few) brews I do look at. I have created some timelines for people in the past, but each time they requested something specific to their use-case. So I personally would hesitate to add a pre-made snippet for timelines, especially with the added complexity to the markdown and to the css.

Mermaid.js seems like a much better option for this, and that PR should move forward.

In the meantime, I would leave this as a single brew resource that can be included in the subreddit/github wiki, for now.

If that sounds reasonable, this PR could be closed, but I'll leave that to @5e-Cleric after any further discussion.

@5e-Cleric
Copy link
Member Author

Sounds reasonable. It can be later added to any other theme, so i am okay closing this for now as a PHB snippet.

The brew should stay up for years, so anyone should be able to find it.

@5e-Cleric 5e-Cleric closed this Feb 17, 2024
@5e-Cleric 5e-Cleric deleted the timeline-snippet branch February 23, 2024 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔍 R1 - Reviewed - Needs Discussion 💬 PR not okayed yet; needs reevaluation or closure
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants