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

Fix download button on macOS & add M1 and Intel options #223

Merged

Conversation

CAM-Gerlach
Copy link
Member

The website's download button causes a 404 on macOS (Intel and M1) due to the Mac installers being renamed with the 5.5.1 release yesterday and split into x86-64 (Intel) and ARM64 (M1) versions. Unfortunately [it is not reliably possible to detect M1 vs Intel cross-browser and cross-version(https://stackoverflow.com/questions/65146751/detecting-apple-silicon-mac-in-javascript), so the simplest and most reliable solution for now is to just offer two buttons on macOS, one for Intel and one for M1.

For this, I modified the custom function that selects and generates the buttons to handle an arbitrary number of buttons per platform, replacing the existing button element in the HTML with a container containing one or more child buttons, and modifying the CSS accordingly. Additionally, I also took the opportunity to refactor our custom JS to use modern ES6 constructs (const and let instead of var, for...of instead of for, etc).

Copy link
Member

@ccordoba12 ccordoba12 left a comment

Choose a reason for hiding this comment

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

Small comment for you @CAM-Gerlach, the rest looks good to me.

assets/static/js/custom_scripts.js Show resolved Hide resolved
Copy link
Member

@ccordoba12 ccordoba12 left a comment

Choose a reason for hiding this comment

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

Thanks @CAM-Gerlach!

@ccordoba12 ccordoba12 merged commit 2da762d into spyder-ide:master Feb 9, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants