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
1.Added a regex filter for the AIX OS. 2. Added constants for the STORYBOOK_MODE 3.Removed unecessary closing of with or '||' operator #6635
base: main
Are you sure you want to change the base?
Conversation
…OS in sswitch case statement.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
I don't think people download Node for AIX within AIX. It is the sort of enterprise OS that system administrators would connect remotely no? cc @mhdawson |
But there can be possibility of downloading node js on the AIX OS. If this case is not going to occur then we should remove the AIX os from the switch case also isn't it? |
Are you sure AIX is part of the user agent for browsers running on AIX? Is there even any modern browser running on AIX? Do you have example user agents? |
The reason why AIX is on the switch is so people can download Node for AIX. Auto detection is just a sugar on the top, that we do for OSs that we know people open on the browser to download Node. |
In the code that i have made changes. We are just getting the constant name for the Operating Systems from the user agent of the browser and this can be used to give the Node js according to the OS of its system. This is just for the easy accessibility to download Node js. |
You haven't answered my question. Is there any real user agent out there that contains "AIX"? What is the point of adding AIX to the user agent query if there aren't any browser user agents with AIX within the user agent string? |
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.
But anyhow, the changes make sense at least in order to make the switch statement work. Although I dont think we should have AIX there to begin with. (In the OS detection, but I might be wrong tho!)
Thanks for the quick fix, appreciate the time you put into this. Ill check with @mhdawson regarding if AIX os detection is intended or not 🤔
Yes, you are right currently there is no any user agent specifiec to the AIX OS but in future it can come. Because AIX is also a popular OS. |
…ng or div and or '||' operator from withSidebarCrossLinks.tsx
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.
- Added Filter for AIX OS
- Used Constants for theme of STORY_BOOK
- Removed Extra closing of
…g constant values for the theme modes.
….org into featureBranch
I see unrelated changes on this PR from the last time Ive approved the PR 🤔 Would you mind putting those changes on another PR as they are unrelated? |
Okay I will do that just tell me when this PR will be merged? |
It is written on the CONTRIBUTING.md file, but in general changes require 48h to get merged, but since the original change is simple I can "fast track" this PR which would allow me to merge it immediately |
Is there need to create different PR for the other commit becuase I have added that all issues commited in the Description of this PR. |
Unfortunately, yes. I can re review this PR with the new changes but with the new changes this PR is not eligible anymore to be fast tracked and it might take time to be reviewed. |
Ok no problem you can take your time
…On Wed, 10 Apr, 2024, 1:50 pm Claudio W, ***@***.***> wrote:
It is written on the CONTRIBUTING.md file, but in general changes require
48h to get merged, but since the original change is simple I can "fast
track" this PR which would allow me to merge it immediately
Is there need to create different PR for the other commit becuase I have
added that all issues commited in the Description of this PR.
Unfortunately, yes. I can re review this PR with the new changes but with
the new changes this PR is not eligible anymore to be fast tracked and it
might take time to be reviewed.
—
Reply to this email directly, view it on GitHub
<#6635 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A3ISMXVILQ52L6VHD6IUGN3Y4TY4JAVCNFSM6AAAAABF7JQSGOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBWHA3TSMBVGY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I read this as indicating its unlikely people will be using a brower on AIX to directly access the site- https://www.ibm.com/support/pages/ibm-aix-firefox-web-browser-faq. Instead most likely they will download from another system and transfer to the AIX server. I'm ok with the autodetection but agree we are likely ok without it. |
If you are Ok without autodetection then there is no need to keep AIX in the switch case for the detection of OS. It will won't work in any case because there is no any browser agent for the AIX OS. |
@mortale2004 @mhdawson how y'all want to proceed? |
I'd just leave out the autodection for AIX. |
Okay no problem
…On Tue, 16 Apr, 2024, 2:44 am Michael Dawson, ***@***.***> wrote:
I'd just leave out the autodection for AIX.
—
Reply to this email directly, view it on GitHub
<#6635 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A3ISMXSRF3M72AKN5G42ABTY5Q7LPAVCNFSM6AAAAABF7JQSGOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJXHAZDANRTGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@@ -25,13 +25,13 @@ const WithSidebarCrossLinks: FC<WithCrossLinksProps> = ({ navKey }) => { | |||
|
|||
return ( | |||
<div className="mt-4 grid w-full grid-cols-2 gap-4 xs:grid-cols-1"> | |||
{(previousCrossLink && ( | |||
{previousCrossLink && ( |
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.
Afaik the div
element is intentional, otherwise the nextCrossLink
goes to the left, instead of staying in the right 😅
@@ -1,7 +1,7 @@ | |||
import type { UserOS } from '@/types/userOS'; | |||
|
|||
export const detectOsInUserAgent = (userAgent: string | undefined): UserOS => { | |||
const osMatch = userAgent?.match(/(Win|Mac|Linux)/); | |||
const osMatch = userAgent?.match(/(Win|Mac|Linux|AIX)/); |
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.
I think as mentioned before, instead of adding AIX
to this match, we should remove the "case AIX"
@@ -4,6 +4,7 @@ import { useLocale } from 'next-intl'; | |||
import { useTheme } from 'next-themes'; | |||
import type { FC } from 'react'; | |||
|
|||
import { STORYBOOK_MODE_THEME } from '@/.storybook/constants'; |
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.
As mentioned before, we shouldn't have Sotrybook constants being imported in Application code, you can create a new constant similar to the Storybook one, on an App constants file, like next.constants.mjs
Added a regex filter for the AIX OS.
Added constants for the STORYBOOK_MODE
Removed unecessary closing of with or '||' operator.