Show tags in search #4234

Closed
opened 2026-02-05 08:18:31 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @blt950 on GitHub (Sep 22, 2023).

Describe the feature you'd like

When doing a quick search (not pressing enter), would it be possible to include the tags of the content? I've tried messing a bit with the code, so perhaps a pointer which file could be edited to achieve this would also be nice .

image

Describe the benefits this would bring to existing BookStack users

If you have a wiki with a lot of content that has the same name, it'd be very helpful to see the tags to know which one is correct for what you're looking for.

Can the goal of this request already be achieved via other means?

Only if you click enter and go to the detailed results, but that's not the idea of the suggestion as most users don't do this.

Have you searched for an existing open/closed issue?

  • I have searched for existing issues and none cover my fundamental request

How long have you been using BookStack?

3 months to 1 year

Additional context

No response

Originally created by @blt950 on GitHub (Sep 22, 2023). ### Describe the feature you'd like When doing a quick search (not pressing enter), would it be possible to include the tags of the content? I've tried messing a bit with the code, so perhaps a pointer which file could be edited to achieve this would also be nice . ![image](https://github.com/BookStackApp/BookStack/assets/2505044/cfbd172a-d4b5-4c87-9b6a-0fb145453c6f) ### Describe the benefits this would bring to existing BookStack users If you have a wiki with a lot of content that has the same name, it'd be very helpful to see the tags to know which one is correct for what you're looking for. ### Can the goal of this request already be achieved via other means? Only if you click enter and go to the detailed results, but that's not the idea of the suggestion as most users don't do this. ### Have you searched for an existing open/closed issue? - [X] I have searched for existing issues and none cover my fundamental request ### How long have you been using BookStack? 3 months to 1 year ### Additional context _No response_
OVERLORD added the 🔨 Feature Request label 2026-02-05 08:18:31 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Sep 24, 2023):

Thanks for the suggestion.
Personally, I'm not keen on adding tags to this view. This is supposed to be a compressed preview really, showing tags will add a lot of noise, use up extra space, and the result may vary quite a lot depending on the extent tags are used in the system.

We could instead show a single line of description text for the book. We already use two lines on pages/chapters to show the parent book context, so we could match that with a single clamped line of description text for books, to provide some visual differentiation in such cases. Of course, it relies on these books having unique descriptions.

Overall though, I'd advise unique names for Books to avoid such issues in the first place, as there will be other scenarios where book titles are shown alone.

@ssddanbrown commented on GitHub (Sep 24, 2023): Thanks for the suggestion. Personally, I'm not keen on adding tags to this view. This is supposed to be a compressed preview really, showing tags will add a lot of noise, use up extra space, and the result may vary quite a lot depending on the extent tags are used in the system. We could instead show a single line of description text for the book. We already use two lines on pages/chapters to show the parent book context, so we could match that with a single clamped line of description text for books, to provide some visual differentiation in such cases. Of course, it relies on these books having unique descriptions. Overall though, I'd advise unique names for Books to avoid such issues in the first place, as there will be other scenarios where book titles are shown alone.
Author
Owner

@blt950 commented on GitHub (Sep 24, 2023):

@ssddanbrown Thanks for coming back to me.

Yeah I understand the arguments of not having this. Though the nature of our wiki will have duplicates as each country has its own documented procedures.

Could you help me point to the blade file that serves the rows in compacted search results? Then we could rather make a local adjustment for this need, than your adjusting this for everyone. I tried a bit earlier but couldn't seem to find the correct part and apply any changes.

@blt950 commented on GitHub (Sep 24, 2023): @ssddanbrown Thanks for coming back to me. Yeah I understand the arguments of not having this. Though the nature of our wiki will have duplicates as each country has its own documented procedures. Could you help me point to the blade file that serves the rows in compacted search results? Then we could rather make a local adjustment for this need, than your adjusting this for everyone. I tried a bit earlier but couldn't seem to find the correct part and apply any changes.
Author
Owner

@ssddanbrown commented on GitHub (Sep 25, 2023):

Could you help me point to the blade file that serves the rows in compacted search results?

Sure, items are iterated within this view:
e7e83a4109/resources/views/search/parts/entity-suggestion-list.blade.php

I have not tested this, but you might get away with using:

@include('entities.list-item', [
    'entity' => $entity,
    'showPath' => true,
    'locked' => false,
    'showTags' => true,
])

with that view instead of the current include statement.

@ssddanbrown commented on GitHub (Sep 25, 2023): > Could you help me point to the blade file that serves the rows in compacted search results? Sure, items are iterated within this view: https://github.com/BookStackApp/BookStack/blob/e7e83a4109ab95e58f3772a2d9cd759b43ddbd3f/resources/views/search/parts/entity-suggestion-list.blade.php I have not tested this, but you might get away with using: ```php @include('entities.list-item', [ 'entity' => $entity, 'showPath' => true, 'locked' => false, 'showTags' => true, ]) ``` with that view instead of the current include statement.
Author
Owner

@blt950 commented on GitHub (Nov 16, 2023):

I finally came around to try this. The suggestion you provided worked flawlessly without any other edits. Thanks! :)

@blt950 commented on GitHub (Nov 16, 2023): I finally came around to try this. The suggestion you provided worked flawlessly without any other edits. Thanks! :)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#4234