Skip to content

Update the mobile_guide page to the new design. #30006

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

Merged
merged 21 commits into from
Jun 10, 2025

Conversation

pixlwave
Copy link
Member

@pixlwave pixlwave commented May 22, 2025

This PR updates the mobile_guide page to match the new design that we're going to roll out on mobile.element.io (we would like both pages to look the same). It makes the following changes:

  • Splits out the SVGs into a mobile_guide/assets directory (for easy sync with mobile.element.io) and the CSS into an index.css page (adding a new copy rule for the SVGs).
  • Adds a mobile_guide_app_variant to config.json (please let me know if there's a better name or if I missed any steps when adding this).
  • Uses the new config option to configure the page to show the right downloads/deep-link for Element/Element X/Element Pro (defaults to Element).
  • Updates the structure of the page to match the new designs.
    • This includes removing the button to continue on the web, as this wasn't in the design. I'm unsure if there's a need for this I might be missing, I was able to load the site in desktop mode without tapping it which seemed reasonable enough to me for the handful of users who might want to try this?
Element Classic Element X Element Pro
gclassic gx gpro

Checklist

  • Tests written for new code (and old code if feasible).
  • New or updated public/exported symbols have accurate TSDoc documentation.
  • Linter and other CI checks pass.
  • I have licensed the changes to Element by completing the Contributor License Agreement (CLA)

pixlwave added 5 commits May 22, 2025 12:11
- Extract the CSS & SVGs from the page for easier sync with mobile.element.io
- Update the webpack config to copy the extracted SVGs (webpack magic handles the CSS).
- Initial implementation of the updated design (still more updates to come).
- Allow the page to be configured for Element Classic, X and Pro.

fixup
@pixlwave
Copy link
Member Author

Ok, I don't understand, when I run locally with yarn build && yarn start I had to reference the assets as mobile_guide/assets/*.svg but I see on the Netlify deployment above it is now attempting to fetch mobile_guide/mobile_guide/assets/*.svg. How come it behaves differently there to on my local machine?

@pixlwave pixlwave marked this pull request as ready for review May 22, 2025 16:32
@pixlwave pixlwave requested a review from a team as a code owner May 22, 2025 16:32
@pixlwave pixlwave requested review from t3chguy and MidhunSureshR May 22, 2025 16:32
}

body {
background: #fff;
Copy link
Member Author

Choose a reason for hiding this comment

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

I haven't switched to using var(--cpd-color-*) yet as I'd like to figure out the best way to make this page easy to copy over to mobile.element.io.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok, I've gone through your comments and used all the tokens I could adding comments for the ones that I couldn't:

Specifically I couldn't find an equivalent for the header/p text colour so I added a comment to that :D

Copy link
Member Author

Choose a reason for hiding this comment

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

Scratch that last bit, I was told to use text secondary from Compound, updated.

@pixlwave
Copy link
Member Author

Ok, I don't understand, when I run locally with yarn build && yarn start I had to reference the assets as mobile_guide/assets/*.svg but I see on the Netlify deployment above it is now attempting to fetch mobile_guide/mobile_guide/assets/*.svg. How come it behaves differently there to on my local machine?

Fixed using <%= require().default %>

- Make the linter happy.
- Let web pack handle the asset sources.
@pixlwave pixlwave force-pushed the doug/mobile-guide branch from e324df6 to e160afb Compare May 28, 2025 09:43
@pixlwave
Copy link
Member Author

pixlwave commented Jun 4, 2025

@pixlwave test looks great, to build the screenshots run yarn test:playwright:screenshots mobile-guide.spec.ts then commit the resulting new files

Thank you! Got it working eventually even if it was a bit of a journey (ended up in a Linux VM 🙈). The axe definitely does have a load of violations though 😔

@t3chguy
Copy link
Member

t3chguy commented Jun 4, 2025

We might need to fix them, @daniellekirkwood is currently working on a VPAT which commits us to making sure things we build are accessible

@pixlwave
Copy link
Member Author

pixlwave commented Jun 5, 2025

Alright, accessibility errors fixed! Caveat:

1w6e9f-819026078

@pixlwave
Copy link
Member Author

pixlwave commented Jun 6, 2025

Thank you! Do I need to do anything else to get this merged? Also, please do squash-merge given the history is so noisy on this one :)

@t3chguy t3chguy merged commit 0e74871 into element-hq:develop Jun 10, 2025
29 of 30 checks passed
@t3chguy
Copy link
Member

t3chguy commented Jun 10, 2025

May need reverting as it breaks Windows builds https://github.com/element-hq/element-web/actions/runs/15559495760/job/43808032961

cc @pixlwave

t3chguy added a commit that referenced this pull request Jun 10, 2025
pixlwave added a commit to pixlwave/element-web that referenced this pull request Jun 19, 2025
snowping pushed a commit to Novaloop-AG/element-web that referenced this pull request Jun 22, 2025
snowping pushed a commit to Novaloop-AG/element-web that referenced this pull request Jun 22, 2025
github-merge-queue bot pushed a commit that referenced this pull request Jul 3, 2025
…t X by default. (#30172)

* Reapply "Update the mobile_guide page to the new design. (#30006)" (#30104)

This reverts commit c51823d.

* Use Element X as the default mobile_guide_app_variant when omitted.

* Fix a build error on Windows.

Additionally revert "Remove unnecessary <%= require %> usages" and let webpack handle all of the assets (without a manual copy rule).

* Exclude mobile_guide from coverage gate

It has playwright tests

* Revert the re-introduction of <%= require %>

* Fix snapshot tests on mobile_guide.

---------

Co-authored-by: Michael Telatynski <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

/mobile_guide should recommend Element X apps by default
3 participants