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

[menu-bar] Bump electron to 33.2.0 and react to 18.3.1 #218

Merged
merged 3 commits into from
Nov 14, 2024

Conversation

gabrieldonadel
Copy link
Member

@gabrieldonadel gabrieldonadel commented Nov 14, 2024

Why

Orbit dependencies are getting quite outdated

How

  • Upgrade all electron-related libraries and remove unnecessary dependencies
  • Fix logs not showing up on windows

Test Plan

Run menubar locally on macOS

Comment on lines +117 to +133
export class Logs {
private logs = this.get();

push(log: Log) {
this.logs.push(log);
if (Platform.OS === 'web') {
localStorage.setItem('logs', JSON.stringify(this.logs));
}
}

get(): Log[] {
if (Platform.OS === 'web') {
return JSON.parse(localStorage.getItem('logs') ?? '[]');
}
return this.logs ?? [];
}
}
Copy link
Member Author

Choose a reason for hiding this comment

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

In order for the logs to work across multiple windows on react-native web we need to use some sort of storage solution like localStorage

Comment on lines +54 to +57
mainWindow.webContents.once('dom-ready', () => {
// Only keep the current session in the logs
mainWindow.webContents.executeJavaScript("localStorage.setItem('logs', '[]')");
});
Copy link
Member Author

Choose a reason for hiding this comment

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

We need to reset localStorage logs on launch to ignore the logs from the previous session

"react-native": "0.76.1",
"react-native-macos": "0.76.0",
"react-native-mmkv": "^2.10.2",
"react-native-svg": "15.8.0",
"react-native-url-polyfill": "^2.0.0",
"react-native-vector-icons": "^9.2.0",
Copy link
Member Author

Choose a reason for hiding this comment

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

no longer used

Comment on lines +26 to +29
"@fluentui/react-progress": "^9.1.90",
"@fluentui/react-provider": "^9.18.0",
"@fluentui/react-switch": "^9.1.97",
"@fluentui/react-theme": "^9.1.22",
Copy link
Member Author

Choose a reason for hiding this comment

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

latest release of @fluentui/react-components is currently broken so we need to use the individual packages directly

@gabrieldonadel gabrieldonadel changed the title [menu-bar] Bump electron and react [menu-bar] Bump electron to 33.2.0 and react to 18.3.1 Nov 14, 2024
@gabrieldonadel gabrieldonadel force-pushed the @gabrieldonadel/bump-electron branch from b4d0d5c to cbfa3c3 Compare November 14, 2024 04:34
@gabrieldonadel gabrieldonadel marked this pull request as ready for review November 14, 2024 04:35
@gabrieldonadel gabrieldonadel force-pushed the @gabrieldonadel/bump-electron branch 3 times, most recently from e5a483a to 5619f72 Compare November 14, 2024 05:11
@gabrieldonadel gabrieldonadel force-pushed the @gabrieldonadel/bump-electron branch from 5619f72 to 539eb94 Compare November 14, 2024 05:17
@gabrieldonadel gabrieldonadel merged commit 7e75f4c into main Nov 14, 2024
1 check passed
@gabrieldonadel gabrieldonadel deleted the @gabrieldonadel/bump-electron branch November 14, 2024 12:43
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.

2 participants