Skip to content

[559] Create "Filter Case Studies" button for mobile version#163

Merged
yuramax merged 22 commits into
mainfrom
559-create-filter-case-studies-button-for-mobile-version
Jun 10, 2025
Merged

[559] Create "Filter Case Studies" button for mobile version#163
yuramax merged 22 commits into
mainfrom
559-create-filter-case-studies-button-for-mobile-version

Conversation

@yuramax

@yuramax yuramax commented Jun 7, 2025

Copy link
Copy Markdown
Contributor

This PR adds a filter button for case studies in the mobile version of the website.

@yuramax yuramax requested a review from killev as a code owner June 7, 2025 19:58
@yuramax yuramax self-assigned this Jun 7, 2025
@coderabbitai

coderabbitai Bot commented Jun 7, 2025

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

A mobile filter modal feature for case studies was introduced. This includes a new FilterModal JavaScript class to manage modal behavior, supporting SCSS for modal styling, and HTML structure updates to add modal containers and trigger elements. Supporting variables and responsive styles were added for proper modal display and interaction.

Changes

File(s) Change Summary
website/modules/asset/ui/src/filterModal.js New module implementing the FilterModal class with methods to open, close, and initialize the modal, dynamically moving filter-related DOM elements into and out of the modal, managing visibility and user interactions. Also exports createFilterHeader() helper function.
website/modules/asset/ui/src/index.js Imports FilterModal, adds initFilterModal() function to instantiate and initialize the modal on DOMContentLoaded and after Barba page transitions, assigns modal instance to window.caseStudiesFilterModal.
website/modules/asset/ui/src/scss/_cases.scss Adds and modifies styles for filter modal UI and responsive filter controls, including .filter-modal and nested elements, .filters-cta button, .items-count__mobile, and updates layout and alignment for .cs_content, .cs_filter-info, and .items-count.
website/modules/asset/ui/src/scss/_variables.scss Adds new SCSS variable $z-index-modal: 100; for modal stacking context.
website/modules/case-studies-page/views/index.html Adds a filter call-to-action button labeled "Filter Case Studies," duplicates items count display with a mobile-specific container, reformats checkbox input, and introduces modal dialog markup for filtering with backdrop, content container, close button, and body container for filter controls. No changes to filtering logic or data handling.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant FilterCTA as "Filter CTA Button"
    participant FilterModal
    participant DOM
    participant Body

    User->>FilterCTA: Click "Filter Case Studies"
    FilterCTA->>FilterModal: open()
    FilterModal->>DOM: Move filter elements into modal
    FilterModal->>DOM: Add "active" class to modal
    FilterModal->>Body: Disable scrolling

    User->>FilterModal: Click close/backdrop/Escape
    FilterModal->>DOM: Move filter elements back
    FilterModal->>DOM: Remove "active" class from modal
    FilterModal->>Body: Enable scrolling
Loading

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7faf488 and a13dc37.

📒 Files selected for processing (1)
  • website/modules/asset/ui/src/index.js (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • website/modules/asset/ui/src/index.js
⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: e2e-tests
  • GitHub Check: security-scan
  • GitHub Check: lint
  • GitHub Check: unit-tests
  • GitHub Check: Analyze (javascript-typescript)
✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 371ca76 and c98934c.

⛔ Files ignored due to path filters (1)
  • website/public/images/arrow-back.svg is excluded by !**/*.svg
📒 Files selected for processing (3)
  • website/modules/asset/ui/src/index.js (1 hunks)
  • website/modules/asset/ui/src/scss/_cases.scss (2 hunks)
  • website/modules/case-studies-page/views/index.html (3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (6)
  • GitHub Check: e2e-tests
  • GitHub Check: security-scan
  • GitHub Check: unit-tests
  • GitHub Check: lint
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: Analyze (actions)
🔇 Additional comments (11)
website/modules/asset/ui/src/scss/_cases.scss (4)

387-389: LGTM! Good use of responsive mixins.

The transition from fixed font values to responsive mixins improves the scalability and maintainability of the typography system.


391-406: Well-styled filter CTA button with proper responsive behavior.

The implementation correctly hides the button on medium+ breakpoints and provides appropriate styling for mobile interaction.


996-1013: Solid mobile-first approach for filter visibility.

The media query logic properly manages the display state of filter elements, showing them only when the modal is active on small screens.


1015-1087: Comprehensive modal implementation with good UX considerations.

The modal styles include:

  • Proper z-index management (1000)
  • Full viewport coverage with backdrop
  • Centered, responsive content container
  • Smooth transitions and accessibility-friendly styling

The pointer-events management ensures proper interaction states.

website/modules/case-studies-page/views/index.html (3)

12-12: Simple and effective filter CTA implementation.

The button integrates seamlessly with the existing filter info layout and uses the appropriate CSS class for styling.


85-104: Excellent accessibility improvements for filter toggles.

The restructured markup includes:

  • Proper ARIA attributes (aria-expanded, aria-controls, aria-labelledby)
  • Semantic label associations
  • Keyboard interaction support with onkeydown
  • Screen reader friendly structure

This significantly improves the user experience for assistive technology users.


251-264: Well-structured modal dialog with proper accessibility.

The modal implementation includes:

  • Semantic container structure
  • Proper ARIA labeling for the close button
  • Keyboard-accessible close button with tabindex="0"
  • Visual back icon for intuitive navigation
  • Empty body container for dynamic content injection
website/modules/asset/ui/src/index.js (4)

212-238: Well-designed constructor with proper initialization.

The constructor effectively:

  • Accepts a configuration object for flexibility
  • Stores all necessary DOM references
  • Maintains original parent relationships for restoration
  • Calls initialization automatically

248-260: Good restoration logic with proper cleanup.

The close() method correctly restores elements to their original positions and cleans up the modal state. The order of operations is appropriate.


262-274: Comprehensive event handling with good UX patterns.

The event listeners cover all expected interaction patterns:

  • Click to open/close
  • Backdrop click to close
  • Escape key to close
  • Proper conditional check for modal active state

240-246: 🛠️ Refactor suggestion

Consider adding error handling for missing elements.

The open() method assumes all elements exist. Consider adding null checks to prevent runtime errors when elements are missing.

 open() {
   this.modalBody.innerHTML = '';
-  if (this.clearAll) this.modalBody.appendChild(this.clearAll);
-  if (this.selectedTags) this.modalBody.appendChild(this.selectedTags);
-  if (this.tagsFilter) this.modalBody.appendChild(this.tagsFilter);
+  if (this.clearAll && this.clearAll.parentNode) {
+    this.modalBody.appendChild(this.clearAll);
+  }
+  if (this.selectedTags && this.selectedTags.parentNode) {
+    this.modalBody.appendChild(this.selectedTags);
+  }
+  if (this.tagsFilter && this.tagsFilter.parentNode) {
+    this.modalBody.appendChild(this.tagsFilter);
+  }
   this.modal.classList.add('active');
 }

Likely an incorrect or invalid review comment.

Comment thread website/modules/asset/ui/src/index.js Outdated
@github-actions

github-actions Bot commented Jun 7, 2025

Copy link
Copy Markdown

🔍 Vulnerabilities of apostrophe-cms:test

📦 Image Reference apostrophe-cms:test
digestsha256:e3287fab3e11d40753f4ce338a058a49d5cc05117badf853a0856c2088a5dd48
vulnerabilitiescritical: 0 high: 3 medium: 0 low: 0
platformlinux/amd64
size289 MB
packages971
📦 Base Image node:23-alpine
also known as
  • 23-alpine3.22
  • 23.11-alpine
  • 23.11-alpine3.22
  • 23.11.1-alpine
  • 23.11.1-alpine3.22
digestsha256:b9d38d589853406ff0d4364f21969840c3e0397087643aef8eede40edbb6c7cd
vulnerabilitiescritical: 0 high: 0 medium: 0 low: 0
critical: 0 high: 1 medium: 0 low: 0 connect-multiparty 2.2.0 (npm)

pkg:npm/connect-multiparty@2.2.0

high 7.8: CVE--2022--29623 Unrestricted Upload of File with Dangerous Type

Affected range<=2.2.0
Fixed versionNot Fixed
CVSS Score7.8
CVSS VectorCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
EPSS Score0.334%
EPSS Percentile56th percentile
Description

An arbitrary file upload vulnerability in the file upload module of Express Connect-Multiparty 2.2.0 allows attackers to execute arbitrary code via a crafted PDF file. NOTE: the Supplier has not verified this vulnerability report.

critical: 0 high: 1 medium: 0 low: 0 async 1.5.2 (npm)

pkg:npm/async@1.5.2

high 7.8: CVE--2021--43138 OWASP Top Ten 2017 Category A9 - Using Components with Known Vulnerabilities

Affected range<2.6.4
Fixed version2.6.4, 3.2.2
CVSS Score7.8
CVSS VectorCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
EPSS Score1.061%
EPSS Percentile77th percentile
Description

A vulnerability exists in Async through 3.2.1 (fixed in 3.2.2), which could let a malicious user obtain privileges via the mapValues() method.

critical: 0 high: 1 medium: 0 low: 0 async 0.9.2 (npm)

pkg:npm/async@0.9.2

high 7.8: CVE--2021--43138 OWASP Top Ten 2017 Category A9 - Using Components with Known Vulnerabilities

Affected range<2.6.4
Fixed version2.6.4, 3.2.2
CVSS Score7.8
CVSS VectorCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
EPSS Score1.061%
EPSS Percentile77th percentile
Description

A vulnerability exists in Async through 3.2.1 (fixed in 3.2.2), which could let a malicious user obtain privileges via the mapValues() method.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 7

🧹 Nitpick comments (3)
website/modules/asset/ui/src/filterModal.js (2)

38-53: Improve readability of parent tracking logic.

The conditional logic for storing original parents is repetitive and could be refactored for better maintainability.

-    this.originalParents = {};
-    if (this.clearAll) {
-      this.originalParents.clearAll = this.clearAll.parentNode;
-    } else {
-      this.originalParents.clearAll = null;
-    }
-    if (this.selectedTags) {
-      this.originalParents.selectedTags = this.selectedTags.parentNode;
-    } else {
-      this.originalParents.selectedTags = null;
-    }
-    if (this.tagsFilter) {
-      this.originalParents.tagsFilter = this.tagsFilter.parentNode;
-    } else {
-      this.originalParents.tagsFilter = null;
-    }
+    this.originalParents = {
+      clearAll: this.clearAll?.parentNode || null,
+      selectedTags: this.selectedTags?.parentNode || null,
+      tagsFilter: this.tagsFilter?.parentNode || null
+    };

109-113: Consider using AbortController for better event listener management.

The escape key listener is added to the document without cleanup, which could lead to memory leaks if multiple instances are created.

+    this.abortController = new AbortController();
+    
     document.addEventListener('keydown', (event) => {
       if (event.key === 'Escape' && this.modal.classList.contains('active')) {
         this.close();
       }
-    });
+    }, { signal: this.abortController.signal });

Add a cleanup method to the class:

destroy() {
  this.abortController?.abort();
}
website/modules/asset/ui/src/scss/_cases.scss (1)

392-400: Add focus management for screen readers.

The mobile items count has proper visibility toggling, but consider adding aria-live regions for dynamic content updates.

 .items-count__mobile {
   @include font-settings(10px, 140%, $font-weight-extra-bold);
   color: $gray-500;
   display: none;
+  
+  &[aria-live] {
+    position: absolute;
+    clip: rect(1px, 1px, 1px, 1px);
+  }
 
   &.is-visible {
     display: block;
+    position: static;
+    clip: auto;
   }
 }
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c98934c and 9e8e7e8.

📒 Files selected for processing (4)
  • website/modules/asset/ui/src/filterModal.js (1 hunks)
  • website/modules/asset/ui/src/index.js (2 hunks)
  • website/modules/asset/ui/src/scss/_cases.scss (3 hunks)
  • website/modules/case-studies-page/views/index.html (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • website/modules/asset/ui/src/index.js
  • website/modules/case-studies-page/views/index.html
⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: lint
  • GitHub Check: e2e-tests
  • GitHub Check: unit-tests
  • GitHub Check: security-scan
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (3)
website/modules/asset/ui/src/filterModal.js (2)

9-14: LGTM! Simple utility function is well-implemented.

The function correctly creates and configures an h2 element for the modal header.


65-69:

Details

❌ Incorrect review comment

Verify the items count element behavior.

The code assumes .items-count__mobile exists and adds a visibility class, but doesn't handle the case where it might not exist initially or be moved multiple times.


🏁 Script executed:

#!/bin/bash
# Verify items count mobile element usage in templates
rg -A 3 -B 3 "items-count__mobile"

Length of output: 2348


Items count behavior is already covered

  • The init() method safely checks for .items-count__mobile with if (itemsCount) so it won’t error when the element is absent.
  • On close, the modal’s close() handler removes the is-visible class and re-appends the element back to .cs_filter-info, restoring its original parent.
  • Using appendChild moves the node rather than cloning it, so repeated open/close cycles won’t produce duplicates.

No additional handling is required here.

Likely an incorrect or invalid review comment.

website/modules/asset/ui/src/scss/_cases.scss (1)

388-390: LGTM! Responsive typography improvements.

The responsive font and line-height mixins properly enhance the existing items count styling.

Comment thread website/modules/asset/ui/src/filterModal.js
Comment thread website/modules/asset/ui/src/filterModal.js Outdated
Comment thread website/modules/asset/ui/src/scss/_cases.scss
Comment thread website/modules/asset/ui/src/scss/_cases.scss Outdated
Comment thread website/modules/asset/ui/src/scss/_cases.scss Outdated
Comment thread website/modules/asset/ui/src/scss/_cases.scss Outdated
Comment thread website/modules/asset/ui/src/scss/_cases.scss Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (7)
website/modules/asset/ui/src/scss/_cases.scss (7)

402-426: Filter CTA button states

You’ve styled the mobile “Filter” CTA with hover and focus transitions—good for visual feedback. For full accessibility, consider adding a :focus-visible outline (instead of no outline) so keyboard users see a clear focus ring.


1015-1018: Reduced-motion: disable all transitions

You’ve disabled backdrop transitions under prefers-reduced-motion, but the modal content still animates. To fully respect user preferences, also disable content transition/animation here.


1039-1048: Base modal container styles

The fixed .filter-modal with pointer-events: none and opacity toggling lays a solid foundation. For a smoother open/close, you could add transition: opacity 0.2s ease-in-out on the container itself.


1054-1062: Backdrop styling

The semi-transparent backdrop with z-index layering is correct. To ensure clicks on the backdrop close the modal, you might want to explicitly set pointer-events: auto here (the container handles events, but being explicit can prevent slip-through).


1080-1086: Close button styling

The text-based close button is styled but lacks hover/focus feedback. Consider adding a subtle color change or underline on :hover/:focus to make it more discoverable.


1088-1090: Modal body spacing

The margin-top: 43px on &__body works, but consider using a spacing variable or consistent scale (e.g. $space-4) for maintainability.


1108-1111: Inactive modal state

You correctly disable interactions and hide the modal when not active. For consistency, you might add a matching transition for opacity here as well.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6a16ba7 and da77de9.

📒 Files selected for processing (2)
  • website/modules/asset/ui/src/scss/_cases.scss (4 hunks)
  • website/modules/asset/ui/src/scss/_variables.scss (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • website/modules/asset/ui/src/scss/_variables.scss
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: Analyze (actions)
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (11)
website/modules/asset/ui/src/scss/_cases.scss (11)

361-368: Align filter info items vertically

You added align-items: center to .cs_filter-info, which improves vertical centering on mobile. This works well, but double-check that it doesn’t conflict with the desktop layout (where you switch to align-items: flex-start).


383-391: Responsive typography for items count

The new @include responsive-font and @include responsive-line-height mixins on .items-count ensure legible text across breakpoints. Nice use of existing mixins.


392-400: Introduce mobile-only items count

.items-count__mobile provides a clean way to show a smaller count in the modal. Ensure your JavaScript toggles the .is-visible class appropriately when the modal opens/closes.


1021-1027: Hide desktop filter elements on mobile

Hiding .clear-all, .selected-tags, and .tags-filter below $breakpoint-medium is spot on. This cleans up the UI until the modal is active.


1028-1036: Toggle filter elements in mobile modal

The #filter-modal.active selector shows the hidden elements when the modal is open. Verify that the markup indeed uses the id="filter-modal" and that there aren’t other elements with the same id. Consider switching to a data-attribute or class selector for flexibility.


1050-1052: Override tags-filter inside modal

Setting max-width: none on .tags-filter within the modal ensures the filter list uses full width. This matches the design.


1063-1079: Modal content wrapper

Good responsive sizing (90vw, min/max widths) and scroll containment. This keeps the content centered and usable on all devices.


1092-1098: Filter header

The header style (border-bottom, font settings) is clear and aligns with the section design. No changes needed here.


1100-1106: Top-row layout

Using flex with gap ensures the close button and clear actions distribute nicely. Looks good.


1113-1116: Active modal state

Switching pointer-events and opacity on .active is concise and performant.


1119-1127: Back-icon

Your .back-icon styling is comprehensive. It loads the SVG correctly and sizes it appropriately.

coderabbitai[bot]
coderabbitai Bot previously approved these changes Jun 9, 2025
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jun 9, 2025
@yuramax yuramax enabled auto-merge (squash) June 9, 2025 22:04

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (3)
website/modules/asset/ui/src/scss/_cases.scss (3)

403-422: ⚡️ Enhance .filters-cta accessibility
Great hover and focus effects—consider adding a :focus-visible outline to support keyboard users and/or ensure the element is a native <button> (or includes role="button") for screen-reader compatibility.

 .filters-cta {
   /* existing styles */
 
   &:focus-visible {
-    /* no outline currently */
+    outline: 2px solid $gray-400;
+    outline-offset: 2px;
   }
 }

Also applies to: 425-426


1021-1039: 🔧 Avoid ID selectors in responsive rules
Scoping via #filter-modal may be overly specific and conflict with other modals. Consider using the component class instead for lower specificity:

- @media (max-width: $breakpoint-medium) {
-   #filter-modal {
+ @media (max-width: $breakpoint-medium) {
+   .filter-modal {
     &.active {
       /* ... */
     }
   }
 }

1040-1121: 🎯 Ensure keyboard focus styles in the modal
The .filter-modal__close button and other interactive elements lack visible focus states. Add :focus-visible styles to the close button for clarity when navigating via keyboard:

 .filter-modal {
   &__close {
     /* existing styles */

+    &:focus-visible {
+      outline: 2px solid $gray-400;
+      outline-offset: 2px;
+    }
   }
 }
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e1c2c7b and 7413309.

📒 Files selected for processing (3)
  • website/modules/@apostrophecms/shared-constants/ui/src/index.js (1 hunks)
  • website/modules/asset/ui/src/scss/_cases.scss (4 hunks)
  • website/modules/case-studies-page/views/index.html (3 hunks)
✅ Files skipped from review due to trivial changes (1)
  • website/modules/@apostrophecms/shared-constants/ui/src/index.js
🚧 Files skipped from review as they are similar to previous changes (1)
  • website/modules/case-studies-page/views/index.html
⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: e2e-tests
  • GitHub Check: lint
  • GitHub Check: unit-tests
  • GitHub Check: security-scan
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (6)
website/modules/asset/ui/src/scss/_cases.scss (6)

8-11: ✅ Improved vertical rhythm in .cs_content
Switching to a flex‐column layout with consistent gap and bottom margin strengthens the section’s vertical rhythm on mobile and desktop.


363-366: ✅ Center items in mobile filter bar
Adding align-items: center ensures that filter info elements align properly on small screens before the medium‐breakpoint override.


389-390: ✅ Make count text responsive
Applying responsive-font and responsive-line-height mixins helps .items-count scale appropriately across breakpoints.


393-401: 🎉 New mobile count variant
Introducing .items-count__mobile with a toggled .is-visible state covers the use case of very small viewports. Ensure the JS correctly toggles .is-visible only on mobile.


1015-1018: ✅ Honor reduced‐motion for modal backdrop
Disabling backdrop transition under prefers-reduced-motion aligns with accessibility best practices.


1122-1130: ✅ Decorative back‐icon styling
The .back-icon background rules are well-defined. If it's purely decorative, ensure the markup uses aria-hidden="true".

coderabbitai[bot]
coderabbitai Bot previously approved these changes Jun 10, 2025
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jun 10, 2025
VitalyyP
VitalyyP previously approved these changes Jun 10, 2025

@VitalyyP VitalyyP left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

Anton-88
Anton-88 previously approved these changes Jun 10, 2025

@Anton-88 Anton-88 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Great work!

@IhorMasechko IhorMasechko left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Got in console:
Uncaught Error: Modal element not found: #filter-modal
    at new FilterM
Знімок екрана 2025-06-10 о 15 28 17
odal
Please try to fix it.

@yuramax yuramax dismissed stale reviews from Anton-88, VitalyyP, and coderabbitai[bot] via a13dc37 June 10, 2025 12:55
@sonarqubecloud

Copy link
Copy Markdown

@yuramax

yuramax commented Jun 10, 2025

Copy link
Copy Markdown
Contributor Author

Got in console: Uncaught Error: Modal element not found: #filter-modal
Modal Please try to fix it.

Thanks, @IhorMasechko. The issue is fixed, please check again.

@IhorMasechko IhorMasechko left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Great job!

@Anton-88 Anton-88 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@VitalyyP VitalyyP left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@killev killev left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks fine.

@yuramax yuramax merged commit 74c27c1 into main Jun 10, 2025
12 checks passed
@yuramax yuramax deleted the 559-create-filter-case-studies-button-for-mobile-version branch June 10, 2025 17:59
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.

5 participants