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 T&C #443

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft

Add T&C #443

wants to merge 5 commits into from

Conversation

Joozty
Copy link
Member

@Joozty Joozty commented Aug 17, 2020

No description provided.

@vercel
Copy link

vercel bot commented Aug 17, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/oacore/dashboard/h3k2mvjow
✅ Preview: https://dashboard-git-toc.oacore.vercel.app

@Joozty
Copy link
Member Author

Joozty commented Aug 17, 2020

@viktor-yakubiv Feel free to review. Everything is ready but text hence keeping it as a draft till it's solved.

Copy link
Member

@viktor-yakubiv viktor-yakubiv left a comment

Choose a reason for hiding this comment

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

Use for the inspiration:

All of them have similar layout: table of contents at the left sidebar and actual text at the right side. As an experiment, we can move ToC to the right side. Also, I see /terms is more popular and simple URL for it.

I am not sure that you did this in the right place. Perhaps it should be under core.ac.uk/terms

@Joozty
Copy link
Member Author

Joozty commented Aug 18, 2020

  1. The table of contents is a great idea. I would suggest to wait a little bit though and see how large the text is. Maybe we may not need it. 🤔
  2. I agree /terms is better path for is
  3. I added it here because dashboard is separate app with the slightly different visual look than the main page. I assumed that the T&C have applied just the dashboard user but if the terms are general then it makes sense to have them on the main domain. I don't know maybe we should involve Petr in the discussion?

@Joozty
Copy link
Member Author

Joozty commented Sep 7, 2020

@viktor-yakubiv Can you please rebase and remove /texts/terms/terms.md file. I don't want to destroy your work since I see you have here some WIP commits.

@viktor-yakubiv
Copy link
Member

I am impressed by my solution of the counters problem! 😄

@viktor-yakubiv
Copy link
Member

In my ideal scenario, we stick with Markdown but setup wrapping headlines (everything between and including headlines) into appropriate sections. It can be done via a remark-plugin (perhaps, we will need to write it) but the problem of the plugin is that it's not possible to handle such (rare or maybe impossible case):

<main>
  <h1>Article Title</h1>
  <p>Paragraph 1</p>

  <section>
    <h2>Section 1 Title</h2>
    <p>Section 1 paragraph</p>
  </section>

  <p>Paragraph 2</p>

  <section>
    <h2>Section 2 Title</h2>
    <p>Section 2 paragraph</p>
  </section>

  <p>Paragraph 3</p>
</main>

As a compromise, we could stick with the HTML what is even more flexible but a bit heavier to write. That is why I considered that we might need MDX, where we can have Markdown with some HTML enhancements and even JSX. However, it proper setup to stay consistent with the rest of the code.

@viktor-yakubiv
Copy link
Member

Furthermore, it would be nice to unify everything using a Webpack loader (actually, a plugin) that loads for Yaml, Markdown, and MDX (with YAML frontmatter) and turns it into a template that has a similar interface for different types of entities.

I checked awesome-webpack but could not find anything that fits our needs. Despite, I found a few that might be useful for us or just funny:

I am afraid we will need to write something and this even feels interesting to me 🙂

Copy link
Member Author

@Joozty Joozty left a comment

Choose a reason for hiding this comment

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

Very nice solution. :)

I am sure webpack plugin would be handy but I don't want to volunteer. 😄

If it were me I would like to suggest to use only one file type either yaml, markdown or mdx. It seems to be easier to support to my mind.

texts/terms/terms.md Outdated Show resolved Hide resolved
components/content/context.js Show resolved Hide resolved
@Joozty
Copy link
Member Author

Joozty commented Sep 14, 2020

@viktor-yakubiv There are some attributes errors in console. Not sure if you are aware 🙂

@viktor-yakubiv
Copy link
Member

Be sure, I'm not. I check the console output only when something doesn't work 😄

@viktor-yakubiv
Copy link
Member

@Joozty thank you for your comment. Check the fix 😄

viktor-yakubiv and others added 5 commits November 2, 2020 14:35
We need MDX for enhanced sections in the Terms and Conditions
markdown file.

@mdx-js/react especially is needed to use MDXProvider
to pass custom components down to the page.
Adds Section and Heading which lave deepness levels calculated
based on the React Context.
Creates 'legal' section in the texts and puts a 'terms.mdx' in there.

Created Terms page with basics content page styling.
Setups MDX context for custom components support on the page.

Adds enumeration for the section headlines on the page.
@vercel
Copy link

vercel bot commented Nov 2, 2020

Deployment failed with the following error:

Resource is limited - try again after in 18 hours (more than 100, code: "api-deployments-free-per-day").

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

Successfully merging this pull request may close these issues.

2 participants