Skip to content

Add badges & better error / none states#28

Merged
Shrinks99 merged 6 commits intomainfrom
henry-styling-tweaks-2
May 20, 2025
Merged

Add badges & better error / none states#28
Shrinks99 merged 6 commits intomainfrom
henry-styling-tweaks-2

Conversation

@Shrinks99
Copy link
Collaborator

@Shrinks99 Shrinks99 commented May 16, 2025

User description

Changes

  • Adds a badge counting the filtered search results for each day (good for when collapsed!)
  • Adds better error / none states for when there's no archives to show
  • Changes search highlight theming to the primary colour

Screenshots

Screenshot 2025-05-19 at 12 53 13 PM Screenshot 2025-05-20 at 12 33 13 PM

PR Type

Enhancement


Description

  • Added badges showing filtered search result count

  • Improved search highlight styling with system colors

  • Added "No results found" state for empty searches

  • Enhanced UI with centered empty state message


Changes walkthrough 📝

Relevant files
Enhancement
argo-archive-list.ts
Enhanced search UI with badges and empty state                     

src/argo-archive-list.ts

  • Added .center-flex-container class for centering content
  • Created .md-badge style with primary color styling
  • Updated search highlight color to use system color variables
  • Added "No results found" message when search returns no results
  • Implemented count badges showing number of filtered results per day
  • +29/-1   

    Need help?
  • Type /help how to ... in the comments thread for any questions about PR-Agent usage.
  • Check out the documentation for more information.
  • @pr-agent-monadical
    Copy link

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Accessibility

    The badge color contrast should be verified to ensure it meets accessibility standards. Consider testing the primary color against on-primary text for sufficient contrast ratio.

      display: block;
      background-color: var(--md-sys-color-primary);
      color: var(--md-sys-color-on-primary);
      font-size: var(--md-sys-typescale-label-small);
      border-radius: 999px;
      padding: 2px 6px;
    }
    Empty State Handling

    The empty state implementation is a good addition, but consider adding an aria-live region to announce when search results change to zero for better screen reader support.

    if (!this.filteredPages.length) {
      return html`
        <div class="card-container center-flex-container">
          <p class="md-typescale-body-medium">No results found.</p>
        </div>
      `;
    }

    Shrinks99 added 2 commits May 19, 2025 12:52
    - Added image
    - Better styling
    - Added module loader for image assets
    @Shrinks99 Shrinks99 changed the title Add badges when searching Add badges & better error / none states May 20, 2025
    @Shrinks99 Shrinks99 merged commit a22394b into main May 20, 2025
    1 of 4 checks passed
    @Shrinks99 Shrinks99 deleted the henry-styling-tweaks-2 branch May 20, 2025 17:34
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Projects

    None yet

    Development

    Successfully merging this pull request may close these issues.

    2 participants