-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
fix: Bitness type in dropdown #6614
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Just a quick headsup. On Firefox Bitness information comes as number when it is x64/x86 (as 64 and 86). Whilst on Chrome it comes as a string So just, let's please ensure this works both on firefox and chrome 😅 |
Lighthouse Results
|
if (currentBitnessExcluded && nonExcludedBitness) { | ||
// We set it as a Number for cases where it is 64 or 86 otherwise we are | ||
// setting it as a string (ARMv7, ARMv6, etc.) | ||
if (Number.isNaN(Number(nonExcludedBitness)) === false) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be transformed into:
const numericBitness = Number(nonExcludedBitness);
setBitness(
numericBitness.toString() === nonExcludedBitness
? numericBitness
: nonExcludedBitness
);
I'm not sure if the value actually needs to be a number? If not:
const numericBitness = Number(nonExcludedBitness).toString();
setBitness(
numericBitness === nonExcludedBitness
? numericBitness
: nonExcludedBitness
);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @canerakdas
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome stuff! Just left a comment but we can proceed with this :D
FYI @canerakdas is OOO for a few days I'll merge the PR as it is, and then @canerakdas can iterate on my feedback afterwards. |
Description
When the default bitness information was excluded and non-excluded bitness existed, we were assigning bitness information as a string by default. With this PR, it was possible to assign numbers such as 86 ,64 or strings such as "arm64" or "armv7l" depending on the type of bitness selected.
With this PR, we aim to create the correct link even when the default bitness is disabled from the
getNodeDownloadUrl
method. I will check if we can prepare test cases to check these links 👀Validation
In the preview, download links should be correct
Related Issues
Fixes #6613
Check List
npx turbo format
to ensure the code follows the style guide.npx turbo test
to check if all tests are passing.npx turbo build
to check if the website builds without errors.