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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tags aren't rendered in Paragraphs section of tag summary page #845

Open
Terrance opened this issue Apr 10, 2024 · 4 comments
Open

Tags aren't rendered in Paragraphs section of tag summary page #845

Terrance opened this issue Apr 10, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@Terrance
Copy link

Given the following page content:

#test

This is a #test tag.

The "馃搶 test" page looks like this:

image

Note that the tag itself is missing from the quoted paragraph. If a paragraph includes multiple tags, they're all missing (i.e. it affects both the tag of the summary page you're looking at, as well as other nearby tags).

@zefhemel
Copy link
Collaborator

Yeah, this is a good point that requires some type of decision.

In general you may use a hashtag "in the flow" of some text, like you're doing now. In others you may use it to tag something more as meta data. Likely in those scenarios you'd put the hash tag either at the very beginning or very end, so we could make the behavior of whether to leave the tag inside or not depend on that. That may lead to unexpected edge cases, though. For instance if your paragraph (in this case, but we should the same rules apply to pages, items, tasks etc.) starts with a hashtag it would disappear, whereas if it's the second word it is not. An alternative would be to keep two versions in the database, one with all tags in tact and one without.

Opinions?

@Maarrk
Copy link
Contributor

Maarrk commented Apr 18, 2024

I'd try to not introduce special behaviour with surprising edge cases in the default application. Also keeping the same information twice seems like it will need to be maintained twice, cause surprises for Plugs etc.

In that case of choosing just one, I'd show the tags, mostly because it supports the IMO simpler and "mainstream" use case of using them in text. In the other situation of having them as metadata, there will probably be some processing through query, template or sth else. So if for that user seeing the tags is an eyesore, they will know the tools to hide them. Also conceptually this is simpler to me - the text is there, but sometimes it's special meaning

Counterargument:

optimize for people with a hacker mindset

馃槈

@Terrance
Copy link
Author

(I should say I'm new to SilverBullet, so still discovering the layers of hackability... 馃檪)

In general you may use a hashtag "in the flow" of some text, like you're doing now. In others you may use it to tag something more as meta data.

My understanding from https://silverbullet.md/Objects#Tags is that tags on their own are what actually tag the page, whereas ones mixed with non-tag text are just linking to it (and indeed the Pages vs. Paragraphs distinction seems to match this, with the latter more like the Linked Mentions section for page links).

I'm not sure what's involved in indexing, but I think in general I'd also expect the whole thing to be captured and shown when presented elsewhere, including any elements with special meanings.

I've also just spotted the table on https://silverbullet.md/Objects#paragraph where #paragraph-tag is similarly omitted from the table showing what I'm assuming is the raw indexed data about tags in paragraphs.

@zefhemel
Copy link
Collaborator

I like what @Maarrk is suggesting, which is to keep the tags in the indexed text, because there's means to remove it later for those who want it.

As to @Terrance your understanding of how it works. Indeed, tags by themselves on an empty line tag the whole page. If they're used in a (top level) paragraph, they'd tag that paragraph. If they're used in a task, or list item, they tag that task or list item. I think I've been inconsistent with in what cases I pull the tags out of the text and in what we don't, so would be good to standardize that. Probably keeping them in makes most sense.

@zefhemel zefhemel added the bug Something isn't working label Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

3 participants