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

Add daemon restart button to split tunneling settings on MacOS #7201

Merged

Conversation

hulthe
Copy link
Contributor

@hulthe hulthe commented Nov 19, 2024


This change is Reviewable

Copy link

linear bot commented Nov 19, 2024

Copy link
Contributor Author

@hulthe hulthe left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 6 files reviewed, 1 unresolved discussion


desktop/packages/mullvad-vpn/src/renderer/components/SplitTunnelingSettings.tsx line 563 at r1 (raw file):

            )}
          </StyledMiniTitle>
          <Spacing height="8px" />

I'm not crazy about adding the Spacing component. Having the spacing expressed as a marginTop in the individual components didn't feel right either though.

@hulthe hulthe requested a review from raksooo November 20, 2024 10:24
@raksooo raksooo requested a review from olmoh November 21, 2024 07:58
Copy link
Member

@raksooo raksooo left a comment

Choose a reason for hiding this comment

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

Reviewed 4 of 6 files at r1, all commit messages.
Reviewable status: 4 of 6 files reviewed, 1 unresolved discussion (waiting on @olmoh)


desktop/packages/mullvad-vpn/src/renderer/components/SplitTunnelingSettings.tsx line 563 at r1 (raw file):

Previously, hulthe (Joakim Hulthe) wrote…

I'm not crazy about adding the Spacing component. Having the spacing expressed as a marginTop in the individual components didn't feel right either though.

I prefer the marginTop :) Maybe ask Oliver for input? @olmoh.

If all elements should have the same spacing then something like flex gap would be useful but I'm not sure tihs is the case here.

@olmoh olmoh requested a review from raksooo November 22, 2024 10:15
Copy link
Collaborator

@olmoh olmoh left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 6 files at r1, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @hulthe and @raksooo)


desktop/packages/mullvad-vpn/src/renderer/components/SplitTunnelingSettings.tsx line 563 at r1 (raw file):

Previously, raksooo (Oskar Nyberg) wrote…

I prefer the marginTop :) Maybe ask Oliver for input? @olmoh.

If all elements should have the same spacing then something like flex gap would be useful but I'm not sure tihs is the case here.

I have nothing against a <Spacing> component, but in that case I think we should have a general one in Layout.tsx that makes use of the spacing tokens and can be reused.
I think in general though what tends to result in the is to not let individual elements handle their spacing, but instead let that be handled by their parents. So I would probably default to using wrapper elements with flex-gap here.


desktop/packages/mullvad-vpn/src/renderer/components/SplitTunnelingSettings.tsx line 560 at r1 (raw file):

            {messages.pgettext(
              'split-tunneling-view',
              'Enabled "Fill disk access" and still having issues?',

Should probably be "Full disk access"


desktop/packages/mullvad-vpn/src/renderer/components/SplitTunnelingSettings.tsx line 565 at r1 (raw file):

          <Spacing height="8px" />
          <StyledSystemSettingsButton onClick={restartDaemon}>
            Restart Mullvad Service

Should this be localized as well?

Copy link
Contributor Author

@hulthe hulthe left a comment

Choose a reason for hiding this comment

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

Reviewable status: 5 of 6 files reviewed, 3 unresolved discussions (waiting on @olmoh and @raksooo)


desktop/packages/mullvad-vpn/src/renderer/components/SplitTunnelingSettings.tsx line 560 at r1 (raw file):

Previously, olmoh (Oliver Mohlin) wrote…

Should probably be "Full disk access"

Oops. Nice catch.


desktop/packages/mullvad-vpn/src/renderer/components/SplitTunnelingSettings.tsx line 563 at r1 (raw file):

Previously, olmoh (Oliver Mohlin) wrote…

I have nothing against a <Spacing> component, but in that case I think we should have a general one in Layout.tsx that makes use of the spacing tokens and can be reused.
I think in general though what tends to result in the is to not let individual elements handle their spacing, but instead let that be handled by their parents. So I would probably default to using wrapper elements with flex-gap here.

Can we use flex-gap here? Given all the spacing is different for each child?


desktop/packages/mullvad-vpn/src/renderer/components/SplitTunnelingSettings.tsx line 565 at r1 (raw file):

Previously, olmoh (Oliver Mohlin) wrote…

Should this be localized as well?

Oh yeah I guess it should. "Open System Settings" isn't localized either though. @raksooo?

Copy link
Collaborator

@olmoh olmoh left a comment

Choose a reason for hiding this comment

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

Reviewable status: 5 of 6 files reviewed, 2 unresolved discussions (waiting on @hulthe and @raksooo)


desktop/packages/mullvad-vpn/src/renderer/components/SplitTunnelingSettings.tsx line 563 at r1 (raw file):

Previously, hulthe (Joakim Hulthe) wrote…

Can we use flex-gap here? Given all the spacing is different for each child?

You would need to use different wrappers with different gaps on them :)

Copy link
Member

@raksooo raksooo left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 6 files at r1.
Reviewable status: 5 of 6 files reviewed, 2 unresolved discussions (waiting on @hulthe and @olmoh)


desktop/packages/mullvad-vpn/src/renderer/components/SplitTunnelingSettings.tsx line 565 at r1 (raw file):

Previously, hulthe (Joakim Hulthe) wrote…

Oh yeah I guess it should. "Open System Settings" isn't localized either though. @raksooo?

Both should be :) We should probably rename StyledSystemSettingsButton to something that describes both.

@hulthe hulthe force-pushed the add-restart-daemon-button-to-split-tunneling-menu-des-1453 branch from eca0f21 to 5b39c82 Compare November 25, 2024 15:50
Copy link
Contributor Author

@hulthe hulthe left a comment

Choose a reason for hiding this comment

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

Reviewable status: 2 of 8 files reviewed, 2 unresolved discussions (waiting on @olmoh and @raksooo)


desktop/packages/mullvad-vpn/src/renderer/components/SplitTunnelingSettings.tsx line 563 at r1 (raw file):

Previously, olmoh (Oliver Mohlin) wrote…

You would need to use different wrappers with different gaps on them :)

I moved Spacing to Layout.tsx, but if using a wrapper with flex-gap is more ideomatic, i can do that instead


desktop/packages/mullvad-vpn/src/renderer/components/SplitTunnelingSettings.tsx line 565 at r1 (raw file):

Previously, raksooo (Oskar Nyberg) wrote…

Both should be :) We should probably rename StyledSystemSettingsButton to something that describes both.

Naming is hard, suggestions welcome 🙃

@hulthe hulthe requested review from raksooo and olmoh November 26, 2024 10:08
Copy link
Collaborator

@olmoh olmoh left a comment

Choose a reason for hiding this comment

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

Reviewed 5 of 6 files at r3.
Reviewable status: 7 of 8 files reviewed, 1 unresolved discussion (waiting on @hulthe and @raksooo)


desktop/packages/mullvad-vpn/src/renderer/components/SplitTunnelingSettings.tsx line 563 at r1 (raw file):

Previously, hulthe (Joakim Hulthe) wrote…

I moved Spacing to Layout.tsx, but if using a wrapper with flex-gap is more ideomatic, i can do that instead

I think both approaches are generally fine, we are doing some work with spacings parallel with this and flex-gap is more in line with what we are doing there. But I think this is fine for now.

@hulthe hulthe force-pushed the add-restart-daemon-button-to-split-tunneling-menu-des-1453 branch 2 times, most recently from 27de15c to 39ae569 Compare November 27, 2024 12:58
olmoh
olmoh previously approved these changes Nov 27, 2024
Copy link
Collaborator

@olmoh olmoh left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 1 of 6 files at r3, 1 of 1 files at r4, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@hulthe hulthe force-pushed the add-restart-daemon-button-to-split-tunneling-menu-des-1453 branch from 39ae569 to dda6861 Compare November 27, 2024 14:40
@hulthe hulthe force-pushed the add-restart-daemon-button-to-split-tunneling-menu-des-1453 branch from dda6861 to e163a46 Compare November 27, 2024 14:50
@hulthe hulthe requested a review from Serock3 November 27, 2024 14:56
Copy link
Contributor

@Serock3 Serock3 left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r5, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@hulthe hulthe merged commit f88c5ba into main Nov 27, 2024
14 checks passed
@hulthe hulthe deleted the add-restart-daemon-button-to-split-tunneling-menu-des-1453 branch November 27, 2024 14:57
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.

4 participants