Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Homepage code example redesign #13844

Merged
merged 23 commits into from
Sep 17, 2024
Merged

Homepage code example redesign #13844

merged 23 commits into from
Sep 17, 2024

Conversation

wackerow
Copy link
Member

@wackerow wackerow commented Sep 10, 2024

Description

  • Updates the displaying of code examples on the homepage for both desktop and mobile
  • Desktop: Updates CodeModal (partially updating to tailwind; leaving Chakra modal logic) with fresh set of pain more in line with latest theming and buttons
    • Replaces close butting with ui/button using "Close" label
  • Mobile: Removes usage of modal; replaces with ui/accordion, allowing code example to unfold in-place.
    • Max-height of 50vh (half the device height) to limit obtrusiveness, and ensure user has screen space available to swipe the document, and not get stuck in nested scrolling.
  • Adds "copy" buttons to both desktop and mobile code examples. Desktop displays icon + "Copy" as "outline" variant (with more space to avoid overlapping text); mobile displays only icon with solid variant (high likelihood of overlapping with other text).
  • For "copy" functionality, added a new useClipboard hook based on usehooks-ts library, mimicking Chakra-UI useClipboard hook.

Preview link

https://deploy-preview-13844--ethereumorg.netlify.app/en/

Related issue

Copy link

netlify bot commented Sep 10, 2024

Deploy Preview for ethereumorg ready!

Name Link
🔨 Latest commit 148cc69
🔍 Latest deploy log https://app.netlify.com/sites/ethereumorg/deploys/66e9436501bd5d0008ac9f8d
😎 Deploy Preview https://deploy-preview-13844--ethereumorg.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
7 paths audited
Performance: 37 (🔴 down 11 from production)
Accessibility: 92 (🔴 down 1 from production)
Best Practices: 83 (🔴 down 9 from production)
SEO: 92 (🔴 down 1 from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@github-actions github-actions bot added the tooling 🔧 Changes related to tooling of the project label Sep 11, 2024
@wackerow wackerow changed the title WIP: Code accordion Homepage code example redesign Sep 12, 2024
@wackerow wackerow added needs dev approval 🧑‍💻 Approval from a developer is needed before merging needs design approval 🧑‍🎨 Approval from a designer is needed before merging labels Sep 12, 2024
@wackerow wackerow marked this pull request as ready for review September 12, 2024 00:49
Copy link
Member

@pettinarip pettinarip left a comment

Choose a reason for hiding this comment

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

@wackerow the mobile code examples look amazing! really like it, well done.

I've created a PR #13861 to share my thoughts on (IMO) a cleaner useClipboard hook.

src/data/CreateWallet.ts Show resolved Hide resolved
src/components/Homepage/useHome.ts Outdated Show resolved Hide resolved
@pettinarip pettinarip merged commit d821b75 into dev Sep 17, 2024
8 of 10 checks passed
@pettinarip pettinarip deleted the code-accordion branch September 17, 2024 12:19
This was referenced Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs design approval 🧑‍🎨 Approval from a designer is needed before merging needs dev approval 🧑‍💻 Approval from a developer is needed before merging tooling 🔧 Changes related to tooling of the project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants