-
Notifications
You must be signed in to change notification settings - Fork 294
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
cuelang.org: allow an author to pre-populate a search box with a specific tag #3394
Comments
This re-restablishes the path /docs/reference/modules/ by using it to present a landing page for CUE modules. A brief introduction provides some context, before leading on to 6 pages selected to give a rounded impression of the modules-related resources available to the reader. The "modules" tag is linked to, instead of providing a dynamic on-page list of the tagged content, because the search shortcode can't pre-populate a query with a tag. This is tracked in cue-lang/cue#3394. Also: the modules reference guide is retitled slightly in order to provide a clear user experience when linking to it by title from across the site. Preview-Path: /docs/reference/modules/ Preview-Path: /docs/reference/modules/manual/ Preview-Path: /docs/reference/ Signed-off-by: Jonathan Matthews <[email protected]> Change-Id: Ia8dc6b1d6e4909469a34200d97ff4f0a2ea6e076 Dispatch-Trailer: {"type":"trybot","CL":1199965,"patchset":2,"ref":"refs/changes/65/1199965/2","targetBranch":"master"}
This re-restablishes the path /docs/reference/modules/ by using it to present a landing page for CUE modules. A brief introduction provides some context, before leading on to 6 pages selected to give a rounded impression of the modules-related resources available to the reader. The "modules" tag is linked to, instead of providing a dynamic on-page list of the tagged content, because the search shortcode can't pre-populate a query with a tag. This is tracked in cue-lang/cue#3394. Also: the modules reference guide is retitled slightly in order to provide a clear user experience when linking to it by title from across the site. Preview-Path: /docs/reference/modules/ Preview-Path: /docs/reference/modules/manual/ Preview-Path: /docs/reference/ Signed-off-by: Jonathan Matthews <[email protected]> Change-Id: Ia8dc6b1d6e4909469a34200d97ff4f0a2ea6e076
This re-restablishes the path /docs/reference/modules/ by using it to present a landing page for CUE modules. A brief introduction provides some context, before leading on to 6 pages selected to give a rounded impression of the modules-related resources available to the reader. The landing page is included in the set of pages which will persist in the LH nav, no matter which Reference sub-page is being viewed. The "modules" tag is linked to, instead of providing a dynamic on-page list of the tagged content, because the search shortcode can't pre-populate a query with a tag. This is tracked in cue-lang/cue#3394. Also: the modules reference manual is retitled slightly in order to provide a clear user experience when linking to it by title from across the site, and has its "toc_hide: true" removed, so that it persists in the reference/modules/ section's LH nav even when the guide itself isn't open. Preview-Path: /docs/reference/modules/ Preview-Path: /docs/reference/modules/manual/ Preview-Path: /docs/reference/ Signed-off-by: Jonathan Matthews <[email protected]> Change-Id: Ia8dc6b1d6e4909469a34200d97ff4f0a2ea6e076
This re-restablishes the path /docs/reference/modules/ by using it to present a landing page for CUE modules. A brief introduction provides some context, before leading on to 6 pages selected to give a rounded impression of the modules-related resources available to the reader. The landing page is included in the set of pages which will persist in the LH nav, no matter which Reference sub-page is being viewed. The "modules" tag is linked to, instead of providing a dynamic on-page list of the tagged content, because the search shortcode can't pre-populate a query with a tag. This is tracked in cue-lang/cue#3394. Also: the modules reference manual is retitled slightly in order to provide a clear user experience when linking to it by title from across the site, and has its "toc_hide: true" removed, so that it persists in the reference/modules/ section's LH nav even when the guide itself isn't open. Preview-Path: /docs/reference/modules/ Preview-Path: /docs/reference/modules/manual/ Preview-Path: /docs/reference/ Signed-off-by: Jonathan Matthews <[email protected]> Change-Id: Ia8dc6b1d6e4909469a34200d97ff4f0a2ea6e076 Dispatch-Trailer: {"type":"trybot","CL":1199965,"patchset":3,"ref":"refs/changes/65/1199965/3","targetBranch":"master"}
This re-restablishes the path /docs/reference/modules/ by using it to present a landing page for CUE modules. A brief introduction provides some context, before leading on to 6 pages selected to give a rounded impression of the modules-related resources available to the reader. The landing page is included in the set of pages which will persist in the LH nav, no matter which Reference sub-page is being viewed. The "modules" tag is linked to, instead of providing a dynamic on-page list of the tagged content, because the search shortcode can't pre-populate a query with a tag. This is tracked in cue-lang/cue#3394. Also: the modules reference manual is retitled slightly in order to provide a clear user experience when linking to it by title from across the site, and has its "toc_hide: true" removed, so that it persists in the reference/modules/ section's LH nav even when the guide itself isn't open. Preview-Path: /docs/reference/modules/ Preview-Path: /docs/reference/modules/manual/ Preview-Path: /docs/reference/ Signed-off-by: Jonathan Matthews <[email protected]> Change-Id: Ia8dc6b1d6e4909469a34200d97ff4f0a2ea6e076
This re-restablishes the path /docs/reference/modules/ by using it to present a landing page for CUE modules. A brief introduction provides some context, before leading on to 6 pages selected to give a rounded impression of the modules-related resources available to the reader. The landing page is included in the set of pages which will persist in the LH nav, no matter which Reference sub-page is being viewed. The "modules" tag is linked to, instead of providing a dynamic on-page list of the tagged content, because the search shortcode can't pre-populate a query with a tag. This is tracked in cue-lang/cue#3394. Also: the modules reference manual is retitled slightly in order to provide a clear user experience when linking to it by title from across the site, and has its "toc_hide: true" removed, so that it persists in the reference/modules/ section's LH nav even when the guide itself isn't open. Preview-Path: /docs/reference/modules/ Preview-Path: /docs/reference/modules/manual/ Preview-Path: /docs/reference/ Signed-off-by: Jonathan Matthews <[email protected]> Change-Id: Ia8dc6b1d6e4909469a34200d97ff4f0a2ea6e076
This establishes the path /docs/concept/modules/ and uses it to present a landing page for CUE modules. A brief introduction provides some context, before leading on to 6 pages presented as a set of cards, selected to give a rounded impression of the modules-related resources available to the reader. The "modules" tag is linked to, instead of providing a dynamic on-page list of the tagged content, because the search shortcode can't pre-populate a query with a tag. (Tracked in cue-lang/cue#3394). Also: this landing page takes the place of the "Modules, Packages, and Instances" concept guide on /docs/concept/popular-guides, whose outdated content being updated is tracked in cue-lang/docs-and-content#179. The modules tag is added to the outdated guide, so that it's at least discoverable whilst it's removed from the popular-guides page. Preview-Path: /docs/concept/modules/ Signed-off-by: Jonathan Matthews <[email protected]> Change-Id: Ia8dc6b1d6e4909469a34200d97ff4f0a2ea6e076 Signed-off-by: Jonathan Matthews <[email protected]> Dispatch-Trailer: {"type":"trybot","CL":1199965,"patchset":9,"ref":"refs/changes/65/1199965/9","targetBranch":"master"}
This establishes the path /docs/concept/modules/ and uses it to present a landing page for CUE modules. A brief introduction provides some context, before leading on to 6 pages presented as a set of cards, selected to give a rounded impression of the modules-related resources available to the reader. The "modules" tag is linked to, instead of providing a dynamic on-page list of the tagged content, because the search shortcode can't pre-populate a query with a tag. (Tracked in cue-lang/cue#3394). Also: this landing page takes the place of the "Modules, Packages, and Instances" concept guide on /docs/concept/popular-guides, whose outdated content being updated is tracked in cue-lang/docs-and-content#179. The modules tag is added to the outdated guide, so that it's at least discoverable whilst it's removed from the popular-guides page. Preview-Path: /docs/concept/modules/ Signed-off-by: Jonathan Matthews <[email protected]> Change-Id: Ia8dc6b1d6e4909469a34200d97ff4f0a2ea6e076 Signed-off-by: Jonathan Matthews <[email protected]> Reviewed-on: https://review.gerrithub.io/c/cue-lang/cuelang.org/+/1199965 Reviewed-by: Paul Jolly <[email protected]> TryBot-Result: CUEcueckoo <[email protected]>
@jpluscplusm For this feature, would you prefer to see the pre-selected tags as unchangeable by the user, similar to content type? Or would you prefer the user being able to modify the selected tags? |
SummaryI'd opt for both the pre-selected search terms and tags to be modifiable by the user, with the only hard requirement being that they should be able to be added to. If the implementation is made significantly simpler by ruling out modification of pre-selected tags, then that option is also fine. I don't feel we want to block the modification of pre-selected search terms. @Wies-UsMedia The rationale for a content type being unchangeable when set was that the search box was being presented inside a specific content hierarchy, and it would feel odd for a user to be presented with the "wrong" content type when its such a fundamental part of the hierarchy. Each page's URL has (more or less) the content type baked in, and if it were possible to copy and share a URL that clearly lived inside content-type A, but which displayed search results for content-type B, then we felt it would potentially be confusing. I think this issue's use case is different. Or, at least, the risk of confusion is significantly reduced. Sure, we could have a search widget under a My sense is that both a pre-set tag and search string should be editable by the user - unless that's much more complex to implement. I think my only "must have" is that search terms and tags, when pre-set, should be able to be added to by the user. In other words, if a user is presented with a pre-set search widget for |
Thanks for clarifying @jpluscplusm Todo Us Media:
estimate: 2-3 hours |
Adds a feature to allow tags to added to the search widget. These will be preselected tags, but can be manually removed after by the user. To test and compare, see: https://cuelang.org/examples/shortcodes/search/ Fixes cue-lang/cue#3394
Adds a feature to allow tags to added to the search widget. These will be preselected tags, but can be manually removed after by the user. To test and compare, see: https://cuelang.org/examples/shortcodes/search/ Fixes cue-lang/cue#3394 Signed-off-by: Wies de Graaf <[email protected]>
Adds a feature to allow tags to added to the search widget. These will be preselected tags, but can be manually removed after by the user. To test and compare, see: https://cuelang.org/examples/shortcodes/search/ Fixes cue-lang/cue#3394 Signed-off-by: Wies de Graaf <[email protected]>
Adds a feature to allow tags to added to the search widget. These will be preselected tags, but can be manually removed after by the user. To test and compare, see: https://cuelang.org/examples/shortcodes/search/ Fixes cue-lang/cue#3394 Closes #477 as merged as of commit 3963a410. Signed-off-by: Wies de Graaf <[email protected]> Change-Id: I56a893311c1022a533ec1a631d63af9717d16f6e Dispatch-Trailer: {"type":"trybot","CL":1203609,"patchset":1,"ref":"refs/changes/09/1203609/1","targetBranch":"master"}
Adds a feature to allow tags to be added to the search widget. These will be preselected tags, but can be manually removed by the user after the page loads. Fixes cue-lang/cue#3394 Closes #477 as merged as of commit 3963a410. Preview-Path: /examples/shortcodes/search/ Signed-off-by: Wies de Graaf <[email protected]> Change-Id: I56a893311c1022a533ec1a631d63af9717d16f6e Dispatch-Trailer: {"type":"trybot","CL":1203609,"patchset":2,"ref":"refs/changes/09/1203609/2","targetBranch":"master"}
Reopening to reflect that predefined search text still needs to be considered. |
@jpluscplusm Do you mean if you manually add it to the url? The shortcode does not support adding a predefined query text at the moment. If you mean via the url: http://localhost:1313/examples/shortcodes/search/?q=schema For instance: So I can't decide when there is just a text query in the url but no tags: add preselected tags. Because that means that in the case above that there's no way of removing the predefined tags because they would get added again when no tags are present in the url. |
Just discussed with jonathan. I've misunderstood the question. |
Closing as discussed with @JorindeUsMedia. I've opened #3566 to track the predefined-search-text issue - but this additional feature will need to prove its necessity a few times before we'll choose to implement it. |
What page were you looking at?
https://cuelang.org/examples/shortcodes/search/
What version of the site were you looking at?
cue-lang/cuelang.org@b24925a
What did you do?
I wanted to place a search box at /docs/reference/modules/ to display a list of all pages tagged with
modules
.What did you expect?
That the
search
shortcode would allow me to pre-populate a search query with a tag, or some specific term.What did you see instead?
I could only pre-populate a content type.
The text was updated successfully, but these errors were encountered: