Skip to content

Frontend and UI design implementation#27

Open
sonofluiz wants to merge 49 commits intoDanielHerr:previewfrom
sonofluiz:master
Open

Frontend and UI design implementation#27
sonofluiz wants to merge 49 commits intoDanielHerr:previewfrom
sonofluiz:master

Conversation

@sonofluiz
Copy link

No description provided.

DanielHerr and others added 30 commits October 6, 2025 14:10
…ts. Closes #10. Paginate app category lists. Closes DanielHerr#19. Add FFOS sideloading instructions. Closes #3.
…rk mode color overrides in the sematic colors file
sonofluiz and others added 19 commits February 9, 2026 17:08
…onsiveness and functionality with the backend
Added base layout and index page designs. Updated components for resp…
Styled all static pages. App cards grid, app details pages, and publi…
Finished styling all pages. Search results page is not fully styled
…restructed favicon loading for index and base layout pages
styled pagefind search result elements and restyled the search page. …
@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a complete frontend and design system implementation for the Firefox Apps Archive project. It establishes a robust design token system, modernizes the icon library to use Phosphor icons, and updates the project's build and styling infrastructure for better compatibility and maintainability. New UI components and web app manifests are also added to enhance the user experience and PWA capabilities.

Highlights

  • Design System Implementation: A comprehensive design token system has been added, documented in DESIGN_TOKENS_README.md. This includes color, typography, spacing, sizing, border, and effects tokens, all defined as CSS custom properties. Best practices and dark mode implementation details are also covered.
  • Icon System Modernization: All Astro icon components have been converted to use standardized Phosphor icon library SVG paths. This involved replacing placeholder paths, correcting specific icons, and ensuring consistent scaling and accessibility attributes across 75 icons.
  • Frontend Infrastructure Updates: The project's frontend infrastructure has been significantly updated, including the addition of PostCSS for CSS custom property transpilation, new dependencies in package.json, updated build commands in deploys.txt, and the introduction of various new CSS and JavaScript files for styling and functionality. Web app manifests and font files have also been added to enhance PWA capabilities and visual consistency.
  • New UI Components: A suite of new Astro UI components has been introduced, covering elements like AppIcon, various Button types (e.g., ButtonAlphabetMenuExpansion, ButtonAppTypes, ButtonCategory, ButtonColorTheme, ButtonCta, ButtonGalleryNav, ButtonLetter, ButtonMenu, ButtonPageNav, ButtonReadMore, ButtonSearch), CardApp, CardAppTypes, ChipHostedStatus, Footer, Header, H1, H2, InputSearchBar, InputText, LabelPageNavButton, LabelSectionNumber, LabelWarning, Link, LinkPublisher, MenuAlphabetPagination, MenuAppCategories, MenuNavSidebar, MenuPageNavButtons, Modal, RadioButton, SearchGraphic, SectionAppDescription, SectionAppDetail, SectionHeadline, SectionReleaseNotes, SectionScreenGallery, SectionSupport, SectionVersion, and TagAppStatus.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • DESIGN_TOKENS_README.md
    • Added comprehensive documentation for the new design token system.
  • ICON_CONVERSION_SESSION_REPORT.md
    • Added a detailed report on the conversion of Astro icon components to Phosphor SVG paths.
  • LICENSE.txt
    • Added the Mozilla Public License Version 2.0.
  • README.md
    • Updated with instructions for app collection download and build commands.
  • astro.config.mjs
    • Removed concurrency setting from the build configuration.
  • build/deploys.txt
    • Added npx astro build and npx pagefind commands.
  • package.json
    • Updated astro version, added @phosphor-icons/core, dialog-polyfill, @csstools/postcss-global-data, and postcss-custom-properties dependencies.
  • postcss.config.cjs
    • Added PostCSS configuration for CSS custom property transpilation.
  • public/common.css
    • Modified to include new CSS rules for layout, selection, search active states, and disabled search elements, and removed legacy theme rules.
  • public/common.js
    • Added JavaScript for theme application, search/nav toggle resets, and handling search unavailable states.
  • public/contact.css
    • Added CSS for contact form styling.
  • public/details.css
    • Modified CSS for app details page, including typography, screenshot list, action buttons, and text blocks.
  • public/dialog_polyfill.css
    • Added CSS for dialog polyfill styling.
  • public/dialog_polyfill.js
    • Added JavaScript for dialog polyfill.
  • public/fonts/inter/OFL.txt
    • Added OFL license for Inter font.
  • public/fonts/inter/README.txt
    • Added README for Inter font.
  • public/fonts/metropolis/SIL Open Font License.txt
    • Added SIL Open Font License for Metropolis font.
  • public/fonts/public_sans/OFL.txt
    • Added OFL license for Public Sans font.
  • public/fonts/public_sans/README.txt
    • Added README for Public Sans font.
  • public/icons/categories-sprite-alt.svg
    • Added alternative categories SVG sprite.
  • public/icons/categories-sprite-black.svg
    • Added black categories SVG sprite.
  • public/icons/categories-sprite.svg
    • Added categories SVG sprite.
  • public/icons/cats-sprite.svg
    • Added cats SVG sprite.
  • public/install.js
    • Modified JavaScript for app installation logic, including launch functionality and error handling.
  • public/install.mjs
    • Added JavaScript for PWA installation logic.
  • public/lists.css
    • Added CSS for app list styling.
  • public/manifest.json
    • Added Web App Manifest for PWA.
  • public/manifest.webapp
    • Added Firefox OS Web App Manifest.
  • public/nav.css
    • Added CSS for navigation styling, including responsive and popover-related rules.
  • public/noscript.css
    • Added CSS for no-JavaScript fallback search styling.
  • public/pagination.css
    • Added CSS for pagination styling.
  • public/pagination.js
    • Added JavaScript for pagination functionality, including details polyfill and scroll-to-current-page logic.
  • public/search-results.css
    • Added CSS for Pagefind search results UI theming and layout.
  • public/search.css
    • Added CSS for search bar styling.
  • public/search.js
    • Added JavaScript for Pagefind search initialization and input wiring.
  • src/assets/astro.svg
    • Removed Astro SVG asset.
  • src/assets/background.svg
    • Removed background SVG asset.
  • src/assets/header-logo.svg
    • Added header logo SVG asset.
  • src/assets/rocket-color.svg
    • Added rocket color SVG asset.
  • src/categories.json
    • Added JSON file defining app categories.
  • src/components/UI/AppIcon.astro
    • Added Astro component for app icons with image/gradient fallback.
  • src/components/UI/BadgeNotification.astro
    • Added Astro component for notification badges.
  • src/components/UI/Button.astro
    • Added Astro component for interactive buttons with primary/secondary variants.
  • src/components/UI/ButtonAlphabetMenuExpansion.astro
    • Added Astro component for alphabet menu expansion button.
  • src/components/UI/ButtonAppTypes.astro
    • Added Astro component for app type selection buttons.
  • src/components/UI/ButtonBack.astro
    • Added Astro component for back navigation buttons.
  • src/components/UI/ButtonCategory.astro
    • Added Astro component for category selection buttons.
  • src/components/UI/ButtonClose.astro
    • Added Astro component for close buttons.
  • src/components/UI/ButtonColorTheme.astro
    • Added Astro component for color theme toggle buttons.
  • src/components/UI/ButtonCta.astro
    • Added Astro component for call-to-action buttons.
  • src/components/UI/ButtonGalleryNav.astro
    • Added Astro component for gallery navigation buttons.
  • src/components/UI/ButtonLetter.astro
    • Added Astro component for alphabet letter selection buttons.
  • src/components/UI/ButtonMenu.astro
    • Added Astro component for menu toggle buttons.
  • src/components/UI/ButtonPageNav.astro
    • Added Astro component for page navigation buttons.
  • src/components/UI/ButtonReadMore.astro
    • Added Astro component for read more/see less buttons.
  • src/components/UI/ButtonSearch.astro
    • Added Astro component for search buttons.
  • src/components/UI/ButtonsAlphabetPagination.astro
    • Added Astro component for alphabet pagination button group.
  • src/components/UI/CardApp.astro
    • Added Astro component for app display cards.
  • src/components/UI/CardAppTypes.astro
    • Added Astro component for app type display cards.
  • src/components/UI/ChipHostedStatus.astro
    • Added Astro component for hosted status chips.
  • src/components/UI/Footer.astro
    • Added Astro component for the site footer.
  • src/components/UI/H1.astro
    • Added Astro component for H1 headings.
  • src/components/UI/H2.astro
    • Added Astro component for H2 headings.
  • src/components/UI/Header.astro
    • Added Astro component for the site header.
  • src/components/UI/HeadlineAppType.astro
    • Added Astro component for app type headlines.
  • src/components/UI/InputSearchBar.astro
    • Added Astro component for search bar inputs.
  • src/components/UI/InputText.astro
    • Added Astro component for text inputs.
  • src/components/UI/LabelPageNavButton.astro
    • Added Astro component for page navigation button labels.
  • src/components/UI/LabelSectionNumber.astro
    • Added Astro component for section number labels.
  • src/components/UI/LabelWarning.astro
    • Added Astro component for warning labels.
  • src/components/UI/Link.astro
    • Added Astro component for generic links.
  • src/components/UI/LinkPublisher.astro
    • Added Astro component for publisher links.
  • src/components/UI/MenuAlphabetPagination.astro
    • Added Astro component for collapsible alphabet pagination menu.
  • src/components/UI/MenuAppCategories.astro
    • Added Astro component for app categories menu.
  • src/components/UI/MenuNavSidebar.astro
    • Added Astro component for the navigation sidebar.
  • src/components/UI/MenuPageNavButtons.astro
    • Added Astro component for page navigation button menu.
  • src/components/UI/Modal.astro
    • Added Astro component for modal dialogs.
  • src/components/UI/RadioButton.astro
    • Added Astro component for radio buttons.
  • src/components/UI/SearchGraphic.astro
    • Added Astro component for search empty state graphic.
  • src/components/UI/SectionAppDescription.astro
    • Added Astro component for app description sections.
  • src/components/UI/SectionAppDetail.astro
    • Added Astro component for app detail sections.
  • src/components/UI/SectionHeadline.astro
    • Added Astro component for section headlines.
  • src/components/UI/SectionReleaseNotes.astro
    • Added Astro component for release notes sections.
  • src/components/UI/SectionScreenGallery.astro
    • Added Astro component for screenshot galleries.
  • src/components/UI/SectionSupport.astro
    • Added Astro component for support sections.
  • src/components/UI/SectionVersion.astro
    • Added Astro component for version information sections.
  • src/components/UI/TagAppStatus.astro
    • Added Astro component for app status tags.
  • src/components/apps_list.astro
    • Modified to use CardApp component and helper functions for localized names and categories.
  • src/components/categories.astro
    • Added Astro component for categories list.
  • src/components/common_metadata.astro
    • Modified to include web app manifest links and origin trial meta tags.
  • src/components/details_header.astro
    • Removed details header Astro component.
  • src/components/details_resources.astro
    • Removed details resources Astro component.
  • src/components/footer.astro
    • Modified to include a link to the GitHub repository and updated the Daniel Herr Software link.
  • src/components/header.astro
    • Added Astro component for the main header.
  • src/components/hidden_inputs.astro
    • Added Astro component for hidden radio and checkbox inputs for theme and search toggles.
  • src/components/icons/app-types/IconCloud.astro
    • Added Astro component for cloud icon.
  • src/components/icons/app-types/IconDownload.astro
    • Added Astro component for download icon.
  • src/components/icons/app-types/IconPackage.astro
    • Added Astro component for package icon.
  • src/components/icons/app-types/IconShapes.astro
    • Added Astro component for shapes icon.
  • src/components/icons/app-types/IconSmileyXEyes.astro
    • Added Astro component for smiley with X eyes icon.
  • src/components/icons/app-types/index.js
    • Added index file for app types icons.
  • src/components/icons/brand/IconCampfire.astro
    • Added Astro component for campfire icon.
  • src/components/icons/brand/IconGithubLogo.astro
    • Added Astro component for GitHub logo icon.
  • src/components/icons/brand/IconHeaderLogo.astro
    • Added Astro component for header logo icon.
  • src/components/icons/brand/IconHeaderLogoGradient.astro
    • Added Astro component for header logo with gradient icon.
  • src/components/icons/brand/IconRocketColor.astro
    • Added Astro component for rocket color icon.
  • src/components/icons/brand/IconRocketColorGradient.astro
    • Added Astro component for rocket color with gradient icon.
  • src/components/icons/brand/index.js
    • Added index file for brand icons.
  • src/components/icons/categories/IconAirplaneTiltFilled.astro
    • Added Astro component for filled airplane tilt icon.
  • src/components/icons/categories/IconAirplaneTiltRegular.astro
    • Added Astro component for regular airplane tilt icon.
  • src/components/icons/categories/IconAtomFilled.astro
    • Added Astro component for filled atom icon.
  • src/components/icons/categories/IconAtomRegular.astro
    • Added Astro component for regular atom icon.
  • src/components/icons/categories/IconBookOpenTextFilled.astro
    • Added Astro component for filled book open text icon.
  • src/components/icons/categories/IconBookOpenTextRegular.astro
    • Added Astro component for regular book open text icon.
  • src/components/icons/categories/IconBooksFilled.astro
    • Added Astro component for filled books icon.
  • src/components/icons/categories/IconBooksRegular.astro
    • Added Astro component for regular books icon.
  • src/components/icons/categories/IconBuildingsFilled.astro
    • Added Astro component for filled buildings icon.
  • src/components/icons/categories/IconBuildingsRegular.astro
    • Added Astro component for regular buildings icon.
  • src/components/icons/categories/IconCameraFilled.astro
    • Added Astro component for filled camera icon.
  • src/components/icons/categories/IconCameraRegular.astro
    • Added Astro component for regular camera icon.
  • src/components/icons/categories/IconChartPieSliceFilled.astro
    • Added Astro component for filled chart pie slice icon.
  • src/components/icons/categories/IconChartPieSliceRegular.astro
    • Added Astro component for regular chart pie slice icon.
  • src/components/icons/categories/IconCloudSunFilled.astro
    • Added Astro component for filled cloud sun icon.
  • src/components/icons/categories/IconCloudSunRegular.astro
    • Added Astro component for regular cloud sun icon.
  • src/components/icons/categories/IconCompassFilled.astro
    • Added Astro component for filled compass icon.
  • src/components/icons/categories/IconCompassRegular.astro
    • Added Astro component for regular compass icon.
  • src/components/icons/categories/IconFilmStripFilled.astro
    • Added Astro component for filled film strip icon.
  • src/components/icons/categories/IconFilmStripRegular.astro
    • Added Astro component for regular film strip icon.
  • src/components/icons/categories/IconGameControllerFilled.astro
    • Added Astro component for filled game controller icon.
  • src/components/icons/categories/IconGameControllerRegular.astro
    • Added Astro component for regular game controller icon.
  • src/components/icons/categories/IconGearFineFilled.astro
    • Added Astro component for filled gear fine icon.
  • src/components/icons/categories/IconGearFineRegular.astro
    • Added Astro component for regular gear fine icon.
  • src/components/icons/categories/IconGlobeFilled.astro
    • Added Astro component for filled globe icon.
  • src/components/icons/categories/IconGlobeRegular.astro
    • Added Astro component for regular globe icon.
  • src/components/icons/categories/IconGraduationCapFilled.astro
    • Added Astro component for filled graduation cap icon.
  • src/components/icons/categories/IconGraduationCapRegular.astro
    • Added Astro component for regular graduation cap icon.
  • src/components/icons/categories/IconHammerFilled.astro
    • Added Astro component for filled hammer icon.
  • src/components/icons/categories/IconHammerRegular.astro
    • Added Astro component for regular hammer icon.
  • src/components/icons/categories/IconHeartbeatFilled.astro
    • Added Astro component for filled heartbeat icon.
  • src/components/icons/categories/IconHeartbeatRegular.astro
    • Added Astro component for regular heartbeat icon.
  • src/components/icons/categories/IconIslandFilled.astro
    • Added Astro component for filled island icon.
  • src/components/icons/categories/IconIslandRegular.astro
    • Added Astro component for regular island icon.
  • src/components/icons/categories/IconMaskHappyFilled.astro
    • Added Astro component for filled mask happy icon.
  • src/components/icons/categories/IconMaskHappyRegular.astro
    • Added Astro component for regular mask happy icon.
  • src/components/icons/categories/IconMusicNotesFilled.astro
    • Added Astro component for filled music notes icon.
  • src/components/icons/categories/IconMusicNotesRegular.astro
    • Added Astro component for regular music notes icon.
  • src/components/icons/categories/IconNewspaperFilled.astro
    • Added Astro component for filled newspaper icon.
  • src/components/icons/categories/IconNewspaperRegular.astro
    • Added Astro component for regular newspaper icon.
  • src/components/icons/categories/IconPinwheelFilled.astro
    • Added Astro component for filled pinwheel icon.
  • src/components/icons/categories/IconPinwheelRegular.astro
    • Added Astro component for regular pinwheel icon.
  • src/components/icons/categories/IconQuestionFilled.astro
    • Added Astro component for filled question icon.
  • src/components/icons/categories/IconQuestionRegular.astro
    • Added Astro component for regular question icon.
  • src/components/icons/categories/IconRadioFilled.astro
    • Added Astro component for filled radio icon.
  • src/components/icons/categories/IconRadioRegular.astro
    • Added Astro component for regular radio icon.
  • src/components/icons/categories/IconShoppingCartFilled.astro
    • Added Astro component for filled shopping cart icon.
  • src/components/icons/categories/IconShoppingCartRegular.astro
    • Added Astro component for regular shopping cart icon.
  • src/components/icons/categories/IconTennisBallFilled.astro
    • Added Astro component for filled tennis ball icon.
  • src/components/icons/categories/IconTennisBallRegular.astro
    • Added Astro component for regular tennis ball icon.
  • src/components/icons/categories/IconUserCircleFilled.astro
    • Added Astro component for filled user circle icon.
  • src/components/icons/categories/IconUserCircleRegular.astro
    • Added Astro component for regular user circle icon.
  • src/components/icons/categories/IconWineFilled.astro
    • Added Astro component for filled wine icon.
  • src/components/icons/categories/IconWineRegular.astro
    • Added Astro component for regular wine icon.
  • src/components/icons/categories/index.js
    • Added index file for categories icons.
  • src/components/icons/index.js
    • Added index file for all icons.
  • src/components/icons/labels/IconEnvelope.astro
    • Added Astro component for envelope icon.
  • src/components/icons/labels/IconLightbulb.astro
    • Added Astro component for lightbulb icon.
  • src/components/icons/labels/IconLightbulbFilament.astro
    • Added Astro component for lightbulb filament icon.
  • src/components/icons/labels/IconLightning.astro
    • Added Astro component for lightning icon.
  • src/components/icons/labels/IconLink.astro
    • Added Astro component for link icon.
  • src/components/icons/labels/IconWarning.astro
    • Added Astro component for warning icon.
  • src/components/icons/labels/index.js
    • Added index file for labels icons.
  • src/components/icons/navigation/IconCaretDown.astro
    • Added Astro component for caret down icon.
  • src/components/icons/navigation/IconCaretLeft.astro
    • Added Astro component for caret left icon.
  • src/components/icons/navigation/IconCaretRight.astro
    • Added Astro component for caret right icon.
  • src/components/icons/navigation/IconList.astro
    • Added Astro component for list icon.
  • src/components/icons/navigation/IconMagnifyingGlass.astro
    • Added Astro component for magnifying glass icon.
  • src/components/icons/navigation/IconX.astro
    • Added Astro component for X icon.
  • src/components/icons/navigation/index.js
    • Added index file for navigation icons.
  • src/components/icons/ratings/IconStar.astro
    • Added Astro component for star icon.
  • src/components/icons/ratings/IconUsers.astro
    • Added Astro component for users icon.
  • src/components/icons/ratings/index.js
    • Added index file for ratings icons.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

The pull request introduces a comprehensive design token system, updates build processes, and refactors several UI components. Key changes include adding a new DESIGN_TOKENS_README.md and updating README.md with build instructions. The astro.config.mjs was modified to remove concurrency: 1, and build/deploys.txt was updated with new build commands. package.json now includes new dependencies for Phosphor icons, dialog polyfill, and PostCSS plugins, along with an Astro version bump. A postcss.config.cjs was added to transpile CSS custom properties for Firefox OS v1 compatibility. Several CSS files (common.css, details.css, lists.css, search-results.css) received extensive styling updates, and new CSS files (dialog_polyfill.css, nav.css, noscript.css, pagination.css, search.css) were added. JavaScript files (common.js, install.js, install.mjs, pagination.js, search.js) were updated for theme persistence, search functionality, and dialog polyfill. Icon assets were updated, and a detailed ICON_CONVERSION_SESSION_REPORT.md was added. The src/categories.json was updated, and numerous Astro UI components (AppIcon, BadgeNotification, Button, ButtonAlphabetMenuExpansion, ButtonAppTypes, ButtonBack, ButtonCategory, ButtonClose, ButtonColorTheme, ButtonCta, ButtonGalleryNav, ButtonLetter, ButtonMenu, ButtonPageNav, ButtonReadMore, ButtonSearch, ButtonsAlphabetPagination, CardApp, CardAppTypes, ChipHostedStatus, Footer, H1, H2, HeadlineAppType, InputSearchBar, InputText, LabelPageNavButton, LabelSectionNumber, LabelWarning, Link, LinkPublisher, MenuAlphabetPagination, MenuAppCategories, MenuNavSidebar, MenuPageNavButtons, Modal, RadioButton, SectionAppDescription, SectionAppDetail, SectionHeadline, SectionReleaseNotes, SectionScreenGallery, SectionSupport, SectionVersion, TagAppStatus) were created or significantly refactored to align with the new design system and improve functionality. Critical issues were identified regarding the use of the unsupported :has() pseudo-class in Firefox for styling and toggle functionality, which breaks keyboard accessibility and UI consistency in key components like RadioButton, InputSearchBar, and Header. A ReferenceError was noted in public/common.js due to accessing a potentially non-existent DOM element. Missing icon files for dynamically constructed <img> tags in src/components/categories.astro will lead to broken images. The build command in build/deploys.txt uses platform-specific syntax, hindering portability, and contains a redundant npx. Minor issues include an unnecessary align-items property in public/common.css, redundant semicolons, and the use of alert() for error reporting, which degrades user experience. Inconsistent focus styles across button components were also noted.

Comment on lines +222 to +256
.radio-button:has(.radio-input:focus-visible) .border-overlay {
border-width: var(--border-lg);
border-color: var(--on-surface-light-faded);
}

/* Active state (mouse click) - thick darker border */
.radio-button:active .border-overlay {
border-width: var(--border-lg);
border-color: var(--on-surface-light-faded);
}

/* Selected state - primary background */
.radio-button[data-checked="true"] {
background-color: var(--on-surface-light-primary);
}

.radio-button[data-checked="true"] .border-overlay {
border-color: var(--on-surface-light-primary);
}

/* Selected + Active state (mouse click) - just thick border, no focus ring */
.radio-button[data-checked="true"]:active .border-overlay {
border-width: var(--border-lg);
border-color: var(--on-surface-light-faded);
}

/* Selected + Focus state (keyboard only) - show focus ring */
.radio-button[data-checked="true"]:has(.radio-input:focus-visible) .border-overlay {
border-width: var(--border-lg);
border-color: var(--on-surface-light-faded);
/* Add visible focus ring around selected button */
box-shadow:
var(--shadow-app-icon),
0 0 0 2px var(--ink-05);
}

Choose a reason for hiding this comment

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

critical

The :has(.radio-input:focus-visible) selector is used to apply focus styles. This will not work in Firefox, as it does not support the :has() pseudo-class. This breaks keyboard accessibility for this component in a key target browser.

Consider using JavaScript to toggle a focus class on the parent label, or restructuring the HTML to use sibling selectors (+ or ~) if possible.

Comment on lines +391 to +404
.search-bar-inner:hover:not(:has(input:focus)):not([data-disabled="true"]) {
box-shadow: none;
}

/* ========================================
STATE: FOCUS
======================================== */
.search-input:focus-visible {
outline: none;
}

.search-bar-inner:has(input:focus-visible) {
box-shadow: none;
}

Choose a reason for hiding this comment

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

critical

The :has(input:focus) and :has(input:focus-visible) selectors are used here to style the search bar when the input is focused. Since the :has() pseudo-class is not supported in Firefox, this styling will not be applied for Firefox users, leading to an inconsistent UI experience.

A common alternative is to use JavaScript to add a focused class to the parent wrapper (search-bar-inner) when the input receives focus and remove it on blur. You can then style the wrapper based on this class.

Comment on lines +296 to +314
:global(body:has(#nav:popover-open)) .action-buttons :global(.button-menu-popover) {
display: none;
}

:global(body:has(#nav:popover-open)) .action-buttons :global(.button-close-popover) {
display: inline-flex;
}
}

/* No-JS fallback: checkbox toggle */
@supports not selector(:popover-open) {
:global(body:has(#nav_toggle_input:checked)) .action-buttons :global(.button-menu-label) {
display: none;
}

:global(body:has(#nav_toggle_input:checked)) .action-buttons :global(.button-close-label) {
display: inline-flex;
}
}

Choose a reason for hiding this comment

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

critical

The :has() pseudo-class is used here to toggle the visibility of the menu and close buttons. However, :has() is not supported in Firefox, which is a key target platform for this project. This will cause the menu toggle functionality to be broken for Firefox users.

To ensure cross-browser compatibility, I recommend using a JavaScript-based approach to toggle a class on a parent element (e.g., <body> or the header itself) when the navigation is open. You can then use standard CSS selectors to show/hide the appropriate buttons.

/* apply theme classes to html as selected */

if(navigator.install) {
pwas_link.hidden = false

Choose a reason for hiding this comment

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

high

This line will cause a ReferenceError if an element with the ID pwas_link does not exist in the DOM when this script runs. To prevent this, you should check if the element exists before attempting to access its properties.

if(typeof pwas_link !== 'undefined') {
	pwas_link.hidden = false
}

<ul id="categories_list">
{ categories.map((category) => (
<li>
<a href={ "/" + category.slug + "/1" }><img src={ "/icons/" + category.slug + ".png" } alt="" width="32" height="32">{ category.name }</a>

Choose a reason for hiding this comment

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

high

The src attribute for the <img> tag is constructed dynamically (e.g., /icons/books.png), but the corresponding icon files do not appear to be included in this pull request. This will result in broken images on the categories page. Please ensure all required image assets are added to the public/icons/ directory.

background: buttonface;
}
body > header label, body > header button {
padding-left: var(--spacing-8);;

Choose a reason for hiding this comment

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

medium

There is a redundant semicolon ;; at the end of this line. While most browsers will ignore it, it's best to remove it to maintain clean code.

	padding-left: var(--spacing-8);

Comment on lines +160 to +165
onclick={`document.getElementById('${uniqueId}').value = ''; document.getElementById('${uniqueId}').focus();`}
role="button"
tabindex="-1"
aria-label="Clear search"
onkeydown={`if(event.key === 'Enter' || event.key === ' '){event.preventDefault(); document.getElementById('${uniqueId}').value = ''; document.getElementById('${uniqueId}').focus();}`}
>

Choose a reason for hiding this comment

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

medium

Using inline onclick and onkeydown attributes makes the code harder to read, maintain, and debug. It's better to separate concerns by moving this logic into a <script> tag. This also improves security by avoiding inline script execution.

I suggest adding a script to this component to handle these events programmatically.

```css
--surface-light-primary-gradient-start: #7543e3 /* Violet 60 */
--surface-light-primary-gradient-end: #582acb /* Violet 70 */
--surface-light-background-start: #fafafa /* White to */

Choose a reason for hiding this comment

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

medium

The comment for --surface-light-background-start seems incomplete. It says /* White to */, which can be confusing. For clarity, I suggest completing it to reflect the gradient's purpose, for example: /* White to strong white */.

- **Metropolis Font**: This font is loaded locally. If font files aren't available, update `/src/styles/fonts.css` with proper font file paths.
- **No Tailwind**: This Astro project does NOT use Tailwind CSS. All styling must use regular CSS with design tokens.
- **Semantic First**: Always prefer semantic tokens over primitive tokens for consistency across light/dark modes.
- **Typography is Explicit**: Unlike Tailwind, typography styles are never inherited. Always set font-family, font-weight, font-size, and line-height explicitly.

Choose a reason for hiding this comment

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

medium

The statement 'Unlike Tailwind, typography styles are never inherited' is technically incorrect for CSS, as properties like font-family, font-weight, etc., are inherited by default. This could cause confusion. A more accurate phrasing would be to recommend explicit declaration on components to avoid relying on inheritance.

I suggest rephrasing to something like: 'Unlike Tailwind, typography styles should not be inherited implicitly. Always set font-family, font-weight, font-size, and line-height explicitly on components to ensure consistency.'

| `--heading-sm-size/line` | 32px / 36px | Sub-headings |
| `--heading-xs-size/line` | 24px / 28px | Card headings |
| `--heading-xxs-size/line` | 20px / 24px | Small headings |
| `--heading-xxxs-size/line` | 16px / 20px | Tiny headings (H2) |

Choose a reason for hiding this comment

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

medium

The usage description for --heading-xxxs-size/line is 'Tiny headings (H2)'. Using H2 for a 'tiny' heading is unconventional and could be misleading for developers. Typically, H2 represents a major section heading. If this is a specific project convention, it might be worth clarifying. Otherwise, consider using a more appropriate heading level like H6 to better reflect its visual hierarchy.

@sonofluiz sonofluiz changed the title Frontend and design implementation Frontend and UI design implementation Mar 14, 2026
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