Skip to content

Conversation

@jumski
Copy link
Contributor

@jumski jumski commented Oct 16, 2025

  • Implemented a button to toggle display of lengthy code snippets with smooth animations
  • Added styles for overlay, button, and responsive behavior, including reduced motion support
  • Enhanced user experience by hiding scroll indicator when overlay is active
  • Updated event handling to manage overlay visibility and animations effectively
  • Included media queries for mobile and reduced motion preferences
  • Minor code adjustments for better maintainability and visual consistency

@changeset-bot
Copy link

changeset-bot bot commented Oct 16, 2025

⚠️ No Changeset found

Latest commit: 4c0d969

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor Author

jumski commented Oct 16, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge:queue - adds this PR to the back of the merge queue
  • hotfix:queue - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@nx-cloud
Copy link

nx-cloud bot commented Oct 16, 2025

View your CI Pipeline Execution ↗ for commit 4c0d969

Command Status Duration Result
nx test:types:health dsl ✅ Succeeded 15s View ↗

☁️ Nx Cloud last updated this comment at 2025-10-18 09:50:47 UTC

Comment on lines 62 to 69
const prefersReducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
// 1. Fade out overlay and start scrolling immediately
overlay.style.opacity = '0';
scrollable.classList.add('scrollable-enabled');
// Start scroll animation while overlay fades
const scrollPromise = smoothScroll(scrollable, scrollable.scrollHeight, 2500);
Copy link
Contributor

Choose a reason for hiding this comment

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

The prefersReducedMotion check is correctly positioned before animation starts, but the code still initiates smoothScroll regardless of preference. Consider restructuring to avoid creating the animation promise entirely when reduced motion is preferred:

// Check if user prefers reduced motion
const prefersReducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;

// 1. Fade out overlay and enable scrolling
overlay.style.opacity = '0';
scrollable.classList.add('scrollable-enabled');

// Handle different animation paths based on motion preference
if (prefersReducedMotion) {
  // Skip animation entirely for reduced motion
  await wait(300);
  overlay.classList.add('hidden');
  // Show buttons immediately
  showControlButtons();
} else {
  // Start scroll animation while overlay fades
  const scrollPromise = smoothScroll(scrollable, scrollable.scrollHeight, 2500);
  await wait(300);
  overlay.classList.add('hidden');
  await scrollPromise;
  showControlButtons();
}

This approach respects user preferences more completely by avoiding unnecessary animation setup.

Suggested change
const prefersReducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
// 1. Fade out overlay and start scrolling immediately
overlay.style.opacity = '0';
scrollable.classList.add('scrollable-enabled');
// Start scroll animation while overlay fades
const scrollPromise = smoothScroll(scrollable, scrollable.scrollHeight, 2500);
const prefersReducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
// 1. Fade out overlay and enable scrolling
overlay.style.opacity = '0';
scrollable.classList.add('scrollable-enabled');
// Handle different animation paths based on motion preference
if (prefersReducedMotion) {
// Skip animation entirely for reduced motion
await wait(300);
overlay.classList.add('hidden');
// Show buttons immediately
showControlButtons();
} else {
// Start scroll animation while overlay fades
const scrollPromise = smoothScroll(scrollable, scrollable.scrollHeight, 2500);
await wait(300);
overlay.classList.add('hidden');
await scrollPromise;
showControlButtons();
}

Spotted by Graphite Agent

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

Comment on lines +221 to +227
.reset-overlay-button {
display: none !important;
}

.scroll-top-button {
display: none !important;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

The CSS selectors for .reset-overlay-button and .scroll-top-button in the mobile media query are missing the :global() wrapper that's used consistently elsewhere in the file. Without this wrapper, these styles won't correctly target the elements in the Astro component.

For consistency and to ensure proper styling in mobile view, these selectors should be updated to:

:global(.reset-overlay-button) {
  display: none !important;
}

:global(.scroll-top-button) {
  display: none !important;
}

This matches the pattern used for these same elements in other parts of the stylesheet.

Suggested change
.reset-overlay-button {
display: none !important;
}
.scroll-top-button {
display: none !important;
}
:global(.reset-overlay-button) {
display: none !important;
}
:global(.scroll-top-button) {
display: none !important;
}

Spotted by Graphite Agent

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

@jumski jumski force-pushed the docs-final-tweaks branch from 18ec9ab to 450c4f1 Compare October 17, 2025 15:02
…esponsiveness

- Implemented a button to toggle display of lengthy code snippets with smooth animations
- Added styles for overlay, button, and responsive behavior, including reduced motion support
- Enhanced user experience by hiding scroll indicator when overlay is active
- Updated event handling to manage overlay visibility and animations effectively
- Included media queries for mobile and reduced motion preferences
- Minor code adjustments for better maintainability and visual consistency
@github-actions
Copy link
Contributor

🔍 Preview Deployment: Website

Deployment successful!

🔗 Preview URL: https://pr-261.pgflow.pages.dev

📝 Details:

  • Branch: docs-landing-simplify
  • Commit: afb1d5956191694507696dd43fd9861b465cc0f4
  • View Logs

_Last updated: _

@github-actions
Copy link
Contributor

🔍 Preview Deployment: Playground

Deployment successful!

🔗 Preview URL: https://pr-261--pgflow-demo.netlify.app

📝 Details:

  • Branch: docs-landing-simplify
  • Commit: afb1d5956191694507696dd43fd9861b465cc0f4
  • View Logs

_Last updated: _

@graphite-app
Copy link
Contributor

graphite-app bot commented Oct 18, 2025

Merge activity

  • Oct 18, 10:12 PM UTC: jumski added this pull request to the Graphite merge queue.
  • Oct 18, 10:12 PM UTC: CI is running for this pull request on a draft pull request (#265) due to your merge queue CI optimization settings.
  • Oct 18, 10:13 PM UTC: Merged by the Graphite merge queue via draft PR: #265.

graphite-app bot pushed a commit that referenced this pull request Oct 18, 2025
…esponsiveness (#261)

- Implemented a button to toggle display of lengthy code snippets with smooth animations
- Added styles for overlay, button, and responsive behavior, including reduced motion support
- Enhanced user experience by hiding scroll indicator when overlay is active
- Updated event handling to manage overlay visibility and animations effectively
- Included media queries for mobile and reduced motion preferences
- Minor code adjustments for better maintainability and visual consistency
@graphite-app graphite-app bot closed this Oct 18, 2025
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