Skip to content

feat: adding TagDiscovery panel feature (#494)#500

Open
EmanuelGF wants to merge 1 commit intolinkdotnet:masterfrom
EmanuelGF:feat-#494
Open

feat: adding TagDiscovery panel feature (#494)#500
EmanuelGF wants to merge 1 commit intolinkdotnet:masterfrom
EmanuelGF:feat-#494

Conversation

@EmanuelGF
Copy link

@EmanuelGF EmanuelGF commented Mar 1, 2026

This PR introduces a new TagDiscovery feature discussed in issue #494 allowing users to discover blog topics via a tag discovery panel accessible from the navigation bar.

  • Displays all tags sorted by blog post count (descending).
  • Optional count badge (configurable via appsettings).
  • Added small button in nav bar that can be disablead from appsettings.
  • Scrollable, responsive modal panel.
  • Added a reusable TagQueryService to aggregate tag usage.
  • Added unit tests for service behavior.
  • Implemented TagDiscoveryPanel with CSS isolation.
  • Navigation integrates with existing /searchByTag/{tag} rout
image image

@linkdotnet
Copy link
Owner

Hey @EmanuelGF, thanks for filing the PR. We are off to a good start, there are some rough edges to iron out:
image

It seems the padding vertically seems a bit off. Horizontally is also off, if you switch to responsive/mobile:
image

"UseMultiAuthorMode": false
"UseMultiAuthorMode": false,
"EnableTagDiscoveryPanel": true,
"ShowTagsWithCountInTagDiscovery": true
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would remove that - we can always show them

"ShowBuildInformation": true,
"UseMultiAuthorMode": false
"UseMultiAuthorMode": false,
"EnableTagDiscoveryPanel": true,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also needs some documentation in the docs/ directory: There is a part where we describes all the settings

{
var unique = Guid.NewGuid().ToString("N");

return BlogPost.Create(
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: There should be a BlogPostBuilder where you would only need the WithTags function

var posts = await blogPostRepository.GetAllAsync();

var tagCounts = posts
// Flatten the collection of tag lists into a single sequence.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those comments are so obvious they can be removed. I assume copilot/... did create them


protected override async Task OnParametersSetAsync()
{
if (IsOpen && _tags.Count == 0)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Edge case: But that leads to stale updates as a creator. If I create an entry and open the dialog, it will show only the initially set version.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably we are better off with a cached version with timing or other means (like we do with the frontpage)

@@ -0,0 +1,70 @@
.tag-overlay {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea is to have as little as possible custom css. Either by using bottstrap 5 itself (which to a big extend should be possible here) or at least move it into the central basic.css

@EmanuelGF
Copy link
Author

Greetings!
Thanks for the feedback.
I'll have another go with it as soon as possible 😊

Have a great week!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants