Codeberg/Community
54
325
Fork
You've already forked Community
12

Markdown frontmatter is not displayed #1144

Open
opened 2023年08月13日 19:07:56 +02:00 by silverpill · 11 comments

After recent software update, Codeberg stopped to display markdown frontmatter. Instead it shows a tiny arrow (see attached picture). This is because the table is now wrapped in <details> html element with an empty summary.

As far as I can tell, there are no related bug reports in Gitea and Forgejo repos.

Example of an affected page: https://codeberg.org/fediverse/fep/src/branch/main/fep/a4ed/fep-a4ed.md. Metadata might be quite important and I think it should not be hidden by default. Also, Github doesn't hide the front matter, so there's an expectation among users of software forges that it will be displayed.

<!-- NOTE: If you wish to report a security issue, please send an email to contact@codeberg.org (for Forgejo, see: https://forgejo.org/.well-known/security.txt) instead. Thank you. Welcome to the Codeberg Community Tracker. This is the place central for bug reports, feature requests and feedback. If you are not sure whether you should use trackers of other Codeberg Projects, then you should use this one. Please keep the following in mind: - Please check https://github.com/go-gitea/gitea/issues or https://codeberg.org/forgejo/forgejo to confirm that your issue hasn't already been reported. Codeberg uses Forgejo (referred to as the "upstream"), which is based on Gitea. - This is *not* a customer support hotline. We are volunteers with limited time and resources, and we consider you, the reporter, to be one as well. Please maintain a courteous and respectful tone, and provide as much information as possible, so that we can work together. - We may take a while with resolving your issue. Your work is still important, even if we cannot acknowledge it directly. Thank you for reporting your findings and giving feedback on Codeberg. ## FAQ ### What happens after I open an issue? Separate contributors will use your issue to communicate with each other. It will also be used to provide updates. There is a decent chance that we will ask you for additional feedback or information. ### sing_up: I noticed a typo in the URL of the registration page. This is an intentional, temporary, surprisingly effective change that helps us against spam. Nice catch! ### I want to contribute to Codeberg! That's awesome, thank you! Take a look at https://codeberg.org/Codeberg/Projects and this tracker, we have a variety of both technical and non-technical tasks that we need help with. --> After recent software update, Codeberg stopped to display markdown frontmatter. Instead it shows a tiny arrow (see attached picture). This is because the table is now wrapped in `<details>` html element with an empty summary. As far as I can tell, there are no related bug reports in Gitea and Forgejo repos. Example of an affected page: https://codeberg.org/fediverse/fep/src/branch/main/fep/a4ed/fep-a4ed.md. Metadata might be quite important and I think it should not be hidden by default. Also, Github doesn't hide the front matter, so there's an expectation among users of software forges that it will be displayed.

It was done by purpose. Because IMO that "frontmatter" sections in most cases are for internal usage only: eg: meta info, how do display the TOC area, etc.

The main body is the better place for important (user-oriented) texts.Disclaimer: that's just my opinion.

It was done by purpose. Because IMO that "frontmatter" sections in most cases are for internal usage only: eg: meta info, how do display the TOC area, etc. The main body is the better place for important (user-oriented) texts.Disclaimer: that's just my opinion.

@wxiaoguang In our use case metadata fields should be both machine-readable and human-readable. Copying metadata fields to the main body is possible, but will make authoring more complicated.

Do you know where this change originates from (Gitea/Forgejo/Codeberg)?

@wxiaoguang In our use case metadata fields should be both machine-readable and human-readable. Copying metadata fields to the main body is possible, but will make authoring more complicated. Do you know where this change originates from (Gitea/Forgejo/Codeberg)?
Gitea: https://github.com/go-gitea/gitea/pull/24137
Owner
Copy link

I suppose the situation would already improve when the details summary is set to "Metadata" / "File Metadata" or something, so people know that they can view more. The tiny arrow is in fact a little hard to spot and rather looks like a rendering bug if you are not familiar to the details/summary elements.

I suppose the situation would already improve when the details summary is set to "Metadata" / "File Metadata" or something, so people know that they can view more. The tiny arrow is in fact a little hard to spot and rather looks like a rendering bug if you are not familiar to the details/summary elements.

Something like a [. . .] symbol could work, but I wouldn't know how to implement that myself :D

Something like a [. . .] symbol could work, but I wouldn't know how to implement that myself :D

I can see 2 problems here:

  1. There used to be an icon for the "details", but after some refactoring PRs, the icon is lost
  2. Make the "meta" section more obvious, either:
    1. Add some inline hints like: "Meta: Author, Datetime ...."
    2. Keep the old behavior, always show the meta table

What do you think about "2.1" or "2.2"?

I can see 2 problems here: 1. There used to be an icon for the "details", but after some refactoring PRs, the icon is lost 2. Make the "meta" section more obvious, either: 1. Add some inline hints like: "Meta: Author, Datetime ...." 2. Keep the old behavior, always show the meta table What do you think about "2.1" or "2.2"?

Personally I'd prefer it to be always shown (2.2). The metadata section of our documents (like fep-a4ed) contains a link to a discussion thread and other important info, and people who are not familiar with the UI may miss it. Github shows metadata by default, here for example https://github.com/ipfs/specs/blob/main/src/ipips/ipip-0001.md.

But 2.1 is good too.

Personally I'd prefer it to be always shown (2.2). The metadata section of our documents (like [fep-a4ed](https://codeberg.org/fediverse/fep/src/branch/main/fep/a4ed/fep-a4ed.md)) contains a link to a discussion thread and other important info, and people who are not familiar with the UI may miss it. Github shows metadata by default, here for example https://github.com/ipfs/specs/blob/main/src/ipips/ipip-0001.md. But 2.1 is good too.
Owner
Copy link

I always found the metadata rendering weird. I propose to have a table with two columns (key-value) and maybe only show a certain size by default with an optional "more" button.

This way, it is less invasive, but people quickly get what they can unfold by pressing more. And the first entries like "document title" or "date" are usually always shown, because they are often on the first positions.

I always found the metadata rendering weird. I propose to have a table with two columns (key-value) and maybe only show a certain size by default with an optional "more" button. This way, it is less invasive, but people quickly get what they can unfold by pressing more. And the first entries like "document title" or "date" are usually always shown, because they are often on the first positions.

I think I have a new idea for this problem.

The code could be refactored to this:

  • If the metadata only contains builtin keys, make it collapsed as default
  • If the metadata contains user's keys, show it by default
I think I have a new idea for this problem. The code could be refactored to this: * If the metadata only contains builtin keys, make it collapsed as default * If the metadata contains user's keys, show it by default

Hey, any updates on this? Even a simple label like "Meta" or "Details" near the arrow symbol would be an improvement.

Hey, any updates on this? Even a simple label like "Meta" or "Details" near the arrow symbol would be an improvement.

I saw a toot on Fedi pointing to this issue, and while I have not read it fully yet, I added it to my queue, and will take a look soon.

I saw a toot on Fedi pointing to this issue, and while I have not read it fully yet, I added it to my queue, and will take a look soon.
Sign in to join this conversation.
No Branch/Tag specified
main
No results found.
Labels
Clear labels
accessibility

Reduces accessibility and is thus a "bug" for certain user groups on Codeberg.
bug

Something is not working the way it should. Does not concern outages.
bug
infrastructure

Errors evidently caused by infrastructure malfunctions or outages
Codeberg

This issue involves Codeberg's downstream modifications and settings and/or Codeberg's structures.
contributions welcome

Please join the discussion and consider contributing a PR!
docs

No bug, but an improvement to the docs or UI description will help
duplicate

This issue or pull request already exists
enhancement

New feature
infrastructure

Involves changes to the server setups, use `bug/infrastructure` for infrastructure-related user errors.
legal

An issue directly involving legal compliance
licence / ToS

involving questions about the ToS, especially licencing compliance
please chill
we are volunteers

Please consider editing your posts and remember that there is a human on the other side. We get that you are frustrated, but it's harder for us to help you this way.
public relations

Things related to Codeberg's external communication
question

More information is needed
question
user support

This issue contains a clearly stated problem. However, it is not clear whether we have to fix anything on Codeberg's end, but we're helping them fix it and/or find the cause.
s/Forgejo

Related to Forgejo. Please also check Forgejo's issue tracker.
s/Forgejo/migration

Migration related issues in Forgejo
s/Pages

Issues related to the Codeberg Pages feature
s/Weblate

Issue is related to the Weblate instance at https://translate.codeberg.org
s/Woodpecker

Woodpecker CI related issue
security

involves improvements to the sites security
service

Add a new service to the Codeberg ecosystem (instead of implementing into Gitea)
upstream

An open issue or pull request to an upstream repository to fix this issue (partially or completely) exists (i.e. Gitea, Forgejo, etc.)
wontfix

Codeberg's current set of contributors are not planning to spend time on delegating this issue.
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
5 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Codeberg/Community#1144
Reference in a new issue
Codeberg/Community
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?