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

feat(environment): macOS version #1030

Merged
merged 4 commits into from
Dec 25, 2020
Merged

Conversation

zbaylin
Copy link
Member

@zbaylin zbaylin commented Dec 24, 2020

This restructures the Revery_Native.Environment.getOS function and the os type to include the operating system version on macOS. The main change is that the Mac variant now contains three constructors: Mac(major, minor, bugfix)

I plan on extending this to other OS's as well (i.e. Linux could contain the kernel version (same format: major, minor, bugfix), Windows could use RtlGetVersion, etc.)

This is immediately to fix the problem with differing design constraints on different macOS versions in onivim/oni2#2876

@zbaylin zbaylin requested a review from bryphe December 24, 2020 23:47
Copy link
Member

@bryphe bryphe left a comment

Choose a reason for hiding this comment

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

Awesome, thanks @zbaylin ! Great idea to bubble up the version directly instead of just using the titlebar size as a proxy.

I think there's some places where we check Revery.Environment.os == Mac in Onivim, so it might help to have some helper methods like Revery.Environment.isMac / Revery.Environment.isWin / Revery.Environment.isLinux to make it easy to switch those. (EDIT: Realized you already have this helper a few places - like in the ScrollView - we could just move it into Revery.Environment)

@zbaylin zbaylin merged commit a0db4ec into master Dec 25, 2020
@Et7f3 Et7f3 deleted the feat/environment/macOS-version branch May 6, 2021 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants