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

Graphical editor for YAML-metadata? #2884

Open
ErikMichelson opened this issue Jul 9, 2020 · 8 comments · May be fixed by hedgedoc/react-client#986
Open

Graphical editor for YAML-metadata? #2884

ErikMichelson opened this issue Jul 9, 2020 · 8 comments · May be fixed by hedgedoc/react-client#986
Labels
scope: frontend Only relevant for the frontend type: question Somebody has a question
Milestone

Comments

@ErikMichelson
Copy link
Member

ErikMichelson commented Jul 9, 2020

What is your question?
Based on the feature request hedgedoc/react-client#312 I thought maybe we want to add a graphical way to manage YAML-metadata fields in general. Any opinions on that?

@ErikMichelson ErikMichelson added the type: question Somebody has a question label Jul 9, 2020
@DerMolly
Copy link
Member

DerMolly commented Jul 9, 2020

I guess we're talking about our own YAML Metadata so

  title: string
  description: string
  tags: string[]
  robots: string
  lang: iso6391
  dir: 'ltr' | 'rtl'
  breaks: boolean
  GA: string
  disqus: string
  type: 'slide' | ''

and neither any of the opengraph data nor any of the slide options?
If not I see no option to implement this feature as we currently have a hard time getting typings for those fields together, not sure how this would improve if we tried building a graphical editor for them.

@ErikMichelson
Copy link
Member Author

I'm just talking about the basic properties you listed above.
Something like a modal to fill in title, description, select tags, etc.

@davidmehren
Copy link
Member

Maybe a separate modal to edit the metadata is not necessary. We could also add a button that inserts the metadata block at the top of the note and provide auto completion for fields like tags, lang etc. That way it would be easier to edit the metadata, but the editing happens in the normal editor, so we don't break the edit-flow with a completely different popup.

@DerMolly
Copy link
Member

DerMolly commented Jul 10, 2020

Not sure how easy auto completion for this would be, but a button to insert metadata could be easily build
Edit:
Apparently we could implement autocompletion with https://codemirror.net/doc/manual.html#addon_show-hint

@davidmehren
Copy link
Member

A few things that came to my mind while thinking about #729:

  • If we go the "full GUI" route (so not just autocompletion), we should add a setting if the user wants to use the GUI or just edit YAML by default. In the former case, we could hide the YAML metadata in a collapsed block by default.
  • Some people add custom metadata for their own automation purposes. How do we handle that?

@DerMolly
Copy link
Member

* Some people add custom metadata for their own automation purposes. How do we handle that?

We only change what we know and keep everything else intact? Question is how easy that will be, but I guess you know someone who does that? So maybe we could acquire some test data from them after we implemented this. I would suggest waiting until we have a implementation to avoid working to closely of that one persons extra metadata.

@mrdrogdrog
Copy link
Member

mrdrogdrog commented Jan 19, 2021

If we go the "full GUI" route (so not just autocompletion), we should add a setting if the user wants to use the GUI or just edit YAML by default. In the former case, we could hide the YAML metadata in a collapsed block by default.

The markdown formatter for code mirror (which is in charge for detecting code blocks) doesn't support front matter. So "collapsing" or "hiding" the front matter yaml is quite difficult.

Some people add custom metadata for their own automation purposes. How do we handle that?

We just let them?... The GUI Editor should only change stuff it knows and keep the rest. That's not really difficult.

@DerMolly DerMolly self-assigned this Jan 25, 2021
@DerMolly DerMolly linked a pull request Jan 26, 2021 that will close this issue
4 tasks
@DerMolly DerMolly removed their assignment Apr 20, 2022
@ErikMichelson
Copy link
Member Author

The GUI editor should also be able to edit the slide options.
See hedgedoc/react-client#717

@DerMolly DerMolly transferred this issue from hedgedoc/react-client Nov 22, 2022
@ErikMichelson ErikMichelson added the scope: frontend Only relevant for the frontend label Nov 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: frontend Only relevant for the frontend type: question Somebody has a question
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

4 participants