Skip to content

Feature/cases back#273

Merged
vasilyyaremchuk merged 4 commits into
mainfrom
feature/cases-back
Jul 8, 2026
Merged

Feature/cases back#273
vasilyyaremchuk merged 4 commits into
mainfrom
feature/cases-back

Conversation

@sf-alexo

@sf-alexo sf-alexo commented Jul 8, 2026

Copy link
Copy Markdown
Contributor
  1. Cut-off content on the case page. The Objective / Challenge / Solution / Results / Tech Stack blocks have an internal scroll — the text isn't fully visible. We need to remove the internal scroll so the whole page scrolls as a single unit.

2.Scroll position reset when returning to the list. After going from a case back to the case studies list, the user gets thrown to the top of the page, to the hero section. We need to preserve the scroll position so the user returns to where they left off.

Updated case studies to behave like a normal scrolling page and preserve user position when navigating back. The case detail layout now uses auto-sized sections without internal overflow, so full Objective/Challenge/Solution/Results/Tech Stack content is visible. The /cases list now saves and restores scroll and filter/search state via sessionStorage, and .DS_Store is ignored.

Alex Ost added 2 commits July 8, 2026 13:40
- Remove internal scroll from cs_info-secondary to allow whole page scrolling
- Change fixed heights to auto for cs_full-details and cs_info containers
- Add top: 0 to image to keep it fixed at top of card
- Add margin-top to cs_info to position primary/secondary content lower
- Add .DS_Store to gitignore for macOS
…se study

- Add scrollMemory.js to persist /cases scroll position in sessionStorage
- Update Barba enter callback to restore scroll on /cases return, handling full page reload
- Add filter state persistence in search-handler.js via sessionStorage
- Save filters on card click, restore on /cases load when returning from case study
- Fix Barba transition blink by always removing old container before reload
@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@sf-alexo, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 40 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 14a775ab-3e54-467b-a4f6-cacbcb9f8f04

📥 Commits

Reviewing files that changed from the base of the PR and between 73fa472 and 3b58658.

📒 Files selected for processing (5)
  • website/modules/asset/ui/src/index.js
  • website/modules/asset/ui/src/initFilterModal.js
  • website/modules/asset/ui/src/initFontChanger.js
  • website/modules/asset/ui/src/initImageLozad.js
  • website/modules/asset/ui/src/scrollMemory.js

Walkthrough

This PR adds scroll position persistence for the case-studies listing page, saving the scroll offset before leaving via Barba transitions and restoring it on re-entry or full page reload, coordinating with existing filter-anchor scroll logic. A new scrollMemory.js module implements the save/restore/clear helpers using sessionStorage. Separately, the case-studies search handler now persists selected filter tags and search term to sessionStorage on card click and restores them when returning to the listing. CSS adjustments modify medium-breakpoint layout for case detail cards (heights, positioning, overflow). A .gitignore entry was added to exclude .DS_Store files.

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is too vague and generic to clearly describe the actual changes in scroll restoration and case studies layout. Use a concise, specific title that mentions the case studies scroll restoration and layout updates.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


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

Comment @coderabbitai help to get the list of available commands.

- Convert consecutive line comments to block comments in scrollMemory.js
- Capitalize comment first letters
- Use object destructuring for pathname
- Replace ternary with if/else
- Add error logging to catch blocks
- Convert negated condition to positive in index.js
- Extract initFilterModal, initFontChanger, initImageLozad to separate modules
- Reduce index.js from 344 to 298 lines to meet max-lines rule

@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

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@website/public/js/modules/case-studies-page/search-handler.js`:
- Around line 28-36: `getFilterStateSnapshot` is hardcoding filter keys instead
of staying in sync with `restoreFilterState`, so new entries in `filterState`
can be lost on save/restore. Update the snapshot logic in `search-handler.js` to
build the filter object dynamically from `filterState` keys, just like
`restoreFilterState` iterates them. Keep `search` as the separate text field,
and ensure any new filter set added to `filterState` is automatically included
without manual listing.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: f6c3ee60-77a2-4ef0-bc89-fbc53c2e4054

📥 Commits

Reviewing files that changed from the base of the PR and between cb77d36 and 73fa472.

📒 Files selected for processing (5)
  • .gitignore
  • website/modules/asset/ui/src/index.js
  • website/modules/asset/ui/src/scrollMemory.js
  • website/modules/asset/ui/src/scss/_cases.scss
  • website/public/js/modules/case-studies-page/search-handler.js

Comment on lines +28 to +36
function getFilterStateSnapshot() {
return {
industry: Array.from(filterState.industry),
stack: Array.from(filterState.stack),
caseStudyType: Array.from(filterState.caseStudyType),
partner: Array.from(filterState.partner),
search: searchTerm || ''
};
}

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.

📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

getFilterStateSnapshot hardcodes filter types, diverging from restoreFilterState.

restoreFilterState iterates Object.keys(filterState) to rebuild state, but getFilterStateSnapshot manually lists industry, stack, caseStudyType, partner. If a new filter type is added to the filterState object, it will be cleared on restore (saved snapshot lacks the key → Array.isArray(undefined)[]) but never persisted, silently dropping the user's selection.

♻️ Proposed refactor — build snapshot dynamically
 function getFilterStateSnapshot() {
-  return {
-    industry: Array.from(filterState.industry),
-    stack: Array.from(filterState.stack),
-    caseStudyType: Array.from(filterState.caseStudyType),
-    partner: Array.from(filterState.partner),
-    search: searchTerm || ''
-  };
+  const snapshot = {};
+  Object.keys(filterState).forEach(function (filterType) {
+    snapshot[filterType] = Array.from(filterState[filterType]);
+  });
+  snapshot.search = searchTerm || '';
+  return snapshot;
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
function getFilterStateSnapshot() {
return {
industry: Array.from(filterState.industry),
stack: Array.from(filterState.stack),
caseStudyType: Array.from(filterState.caseStudyType),
partner: Array.from(filterState.partner),
search: searchTerm || ''
};
}
function getFilterStateSnapshot() {
const snapshot = {};
Object.keys(filterState).forEach(function (filterType) {
snapshot[filterType] = Array.from(filterState[filterType]);
});
snapshot.search = searchTerm || '';
return snapshot;
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@website/public/js/modules/case-studies-page/search-handler.js` around lines
28 - 36, `getFilterStateSnapshot` is hardcoding filter keys instead of staying
in sync with `restoreFilterState`, so new entries in `filterState` can be lost
on save/restore. Update the snapshot logic in `search-handler.js` to build the
filter object dynamically from `filterState` keys, just like
`restoreFilterState` iterates them. Keep `search` as the separate text field,
and ensure any new filter set added to `filterState` is automatically included
without manual listing.

- Remove unused initFilterModal import from index.js
- Remove extra blank line
- Fix block comment formatting with proper * prefixes
- Convert function declarations to function expressions in extracted modules
- Fix block comment formatting in scrollMemory.js
@vasilyyaremchuk vasilyyaremchuk merged commit 0a160e7 into main Jul 8, 2026
10 of 11 checks passed
@vasilyyaremchuk vasilyyaremchuk deleted the feature/cases-back branch July 8, 2026 13:42
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