Skip to content

Commit

Permalink
Merge pull request bitfinexcom#507 from bitfinexcom/staging
Browse files Browse the repository at this point in the history
Release version 4.33.0
  • Loading branch information
ezewer authored Feb 21, 2025
2 parents 359f424 + 4767aec commit d10f2bd
Show file tree
Hide file tree
Showing 14 changed files with 55 additions and 22 deletions.
8 changes: 7 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,11 @@
"env": {
"mocha": true
},
"extends": "standard"
"extends": "standard",
"ignorePatterns": [
".github",
"bfx-report-ui",
"bfx-reports-framework",
"dist"
]
}
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [4.33.0] - 2025-02-19

### Added

- Implemented `Electron` app menu bar and corresponding functionality in the UI title instead of the native one. This is very useful as it saves overall space and at the same time constantly displays the menu and does not require the user to press the `Alt` key to display it (as the practice has shown, because of the last one, many inexperienced users do not even know about the existence of menu functions). Available for the `Windows` and `Linux` app users. On the `Mac` we have to hide the menu in the UI and show the native electron menu bar due to some `MacOS` specifics, it's impossible to have proper menu item control from the UI. PR: [bfx-report-ui#898](https://github.com/bitfinexcom/bfx-report-ui/pull/898)
- Added exponential backoff and jitter for bfx-api requests to improve `Rate Limit` bypassing. Here we implemented `Decorrelated Jitter` described in AWS article https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/ And added a small improvement to shift the starting point of jitter for each iteration. In practice, it helps better to move through the `Rate Limit` for the `Sync` and `Tax Report`. PR: [bfx-report#420](https://github.com/bitfinexcom/bfx-report/pull/420)

### Changed

- Changed font family to `Inter` similar to used on the main platform. PR: [bfx-report-ui#896](https://github.com/bitfinexcom/bfx-report-ui/pull/896)
- Reworked and optimized `ThemeSwitcher` component in a more performant way and reduced redundant code. PR: [bfx-report-ui#897](https://github.com/bitfinexcom/bfx-report-ui/pull/897)
- Changed the font family from `Roboto` to `Inter` in the Electron env to prevent throwing error due to the last UI changes (electron layouts use font source from the UI sub-module). PR: [bfx-report-electron#494](https://github.com/bitfinexcom/bfx-report-electron/pull/494)
- Disabled native title menu bar to use UI implementation via Electron renderer IPC bridge. PR: [bfx-report-electron#504](https://github.com/bitfinexcom/bfx-report-electron/pull/504)
- Migrated from `html-pdf` to `puppeteer` for `pdf` creation as the first one repo is not `maintained` anymore. PRs: [bfx-reports-framework#432](https://github.com/bitfinexcom/bfx-reports-framework/pull/432), [bfx-report#419](https://github.com/bitfinexcom/bfx-report/pull/419)

### Fixed

- Fixed setting `IS_AUTO_UPDATE_DISABLED` config flag for the `dev` mode. PR: [bfx-report-electron#484](https://github.com/bitfinexcom/bfx-report-electron/pull/484)
- Fixed the UI setup flow for the `dev` mode. PR: [bfx-report-electron#485](https://github.com/bitfinexcom/bfx-report-electron/pull/485)
- Fixed error metadata processing, related to this test pipeline: https://github.com/bitfinexcom/bfx-report/actions/runs/12114987593/job/33772854879 PR: [bfx-report#418](https://github.com/bitfinexcom/bfx-report/pull/418)

## [4.32.0] - 2025-01-22

### Added
Expand Down
2 changes: 1 addition & 1 deletion bfx-report-ui
Submodule bfx-report-ui updated 41 files
+2 −2 package-lock.json
+1 −1 package.json
+6 −0 src/App.js
+80 −0 src/components/ElectronMenu/ElectronMenu.dropdown.js
+29 −0 src/components/ElectronMenu/ElectronMenu.js
+47 −0 src/components/ElectronMenu/ElectronMenu.submenu.js
+133 −0 src/components/ElectronMenu/_ElectronMenu.scss
+1 −0 src/components/ElectronMenu/index.js
+2 −0 src/state/base/constants.js
+2 −0 src/state/base/saga.js
+43 −0 src/state/electronMenu/actions.js
+10 −0 src/state/electronMenu/constants.js
+33 −0 src/state/electronMenu/reducer.js
+36 −0 src/state/electronMenu/saga.js
+11 −0 src/state/electronMenu/selectors.js
+2 −0 src/state/reducers.js
+2 −0 src/state/sagas.js
+0 −1 src/state/ui/saga.js
+ src/styles/fonts/Inter-Light.ttf
+ src/styles/fonts/Inter-Medium.ttf
+ src/styles/fonts/Inter-Regular.ttf
+ src/styles/fonts/Inter-SemiBold.ttf
+ src/styles/fonts/KFOmCnqEu92Fr1Mu4WxKOzY.woff2
+ src/styles/fonts/KFOmCnqEu92Fr1Mu4mxK.woff2
+ src/styles/fonts/KFOmCnqEu92Fr1Mu5mxKOzY.woff2
+ src/styles/fonts/KFOmCnqEu92Fr1Mu72xKOzY.woff2
+ src/styles/fonts/KFOmCnqEu92Fr1Mu7GxKOzY.woff2
+ src/styles/fonts/KFOmCnqEu92Fr1Mu7WxKOzY.woff2
+ src/styles/fonts/KFOmCnqEu92Fr1Mu7mxKOzY.woff2
+ src/styles/fonts/Roboto-Medium.woff2
+31 −0 src/styles/fonts/inter.css
+0 −64 src/styles/fonts/roboto.css
+13 −2 src/styles/index.scss
+1 −1 src/ui/DataTable/_DataTable.scss
+5 −0 src/ui/NavMenu/_NavMenu.scss
+1 −1 src/ui/NavSwitcher/_NavSwitcher.scss
+0 −18 src/ui/ThemeSwitcher/ThemeSwitcher.container.js
+39 −42 src/ui/ThemeSwitcher/ThemeSwitcher.js
+0 −9 src/ui/ThemeSwitcher/ThemeSwitcher.props.js
+1 −3 src/ui/ThemeSwitcher/index.js
+5 −0 src/utils/handleElectronLoad.js
3 changes: 1 addition & 2 deletions electronEnv.json.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"NODE_ENV": "production",
"IS_AUTO_UPDATE_DISABLED": false,
"REPO_OWNER": "bitfinexcom",
"SHOW_NATIVE_TITLE_BAR": true
"REPO_OWNER": "bitfinexcom"
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bfx-report-electron",
"version": "4.32.0",
"version": "4.33.0",
"repository": "https://github.com/bitfinexcom/bfx-report-electron",
"description": "Reporting tool",
"author": "bitfinex.com",
Expand Down
4 changes: 2 additions & 2 deletions scripts/build-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,11 @@ if [ $isAutoUpdateDisabled == 1 ]; then
echo -e "\n${COLOR_YELLOW}Auto-update is turned off!${COLOR_NORMAL}"

sed -i".bak" -E -e \
"s/\"IS_AUTO_UPDATE_DISABLED\": (false)|(true)/\"IS_AUTO_UPDATE_DISABLED\": true/g" \
"s/\"IS_AUTO_UPDATE_DISABLED\": ((false)|(true))/\"IS_AUTO_UPDATE_DISABLED\": true/g" \
"$ROOT/$ELECTRON_ENV_FILE_NAME"; rm -f "$ROOT/$ELECTRON_ENV_FILE_NAME.bak"
else
sed -i".bak" -E -e \
"s/\"IS_AUTO_UPDATE_DISABLED\": (false)|(true)/\"IS_AUTO_UPDATE_DISABLED\": false/g" \
"s/\"IS_AUTO_UPDATE_DISABLED\": ((false)|(true))/\"IS_AUTO_UPDATE_DISABLED\": false/g" \
"$ROOT/$ELECTRON_ENV_FILE_NAME"; rm -f "$ROOT/$ELECTRON_ENV_FILE_NAME.bak"
fi

Expand Down
9 changes: 6 additions & 3 deletions scripts/build-ui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,12 @@ checkNodeModulesDir "$UI_FOLDER"
npm ls --depth=0 --only=prod 1<&-

echo -e "\n${COLOR_BLUE}UI building...${COLOR_NORMAL}"
mv -f "$ROOT/.eslintrc" "$ROOT/off-eslintrc"
npm run build
mv -f "$ROOT/off-eslintrc" "$ROOT/.eslintrc"
mv -f "$ROOT/.eslintrc" "$ROOT/off-eslintrc" || [[ $? == 1 ]]
npm run build || (
echo -e "\n${COLOR_RED}The UI has not been built successful${COLOR_NORMAL}" >&2 &&
exit 1
)
mv -f "$ROOT/off-eslintrc" "$ROOT/.eslintrc" || [[ $? == 1 ]]

if ! [ -s "$UI_BUILD_FOLDER/index.html" ]; then
echo -e "\n${COLOR_RED}The UI has not been built successful${COLOR_NORMAL}" >&2
Expand Down
4 changes: 2 additions & 2 deletions scripts/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ if [ $isAutoUpdateDisabled == 1 ]; then
echo -e "\n${COLOR_YELLOW}Auto-update is turned off!${COLOR_NORMAL}"

sed -i".bak" -E -e \
"s/\"IS_AUTO_UPDATE_DISABLED\": (false)|(true)/\"IS_AUTO_UPDATE_DISABLED\": true/g" \
"s/\"IS_AUTO_UPDATE_DISABLED\": ((false)|(true))/\"IS_AUTO_UPDATE_DISABLED\": true/g" \
"$ROOT/$ELECTRON_ENV_FILE_NAME"; rm -f "$ROOT/$ELECTRON_ENV_FILE_NAME.bak"
else
sed -i".bak" -E -e \
"s/\"IS_AUTO_UPDATE_DISABLED\": (false)|(true)/\"IS_AUTO_UPDATE_DISABLED\": false/g" \
"s/\"IS_AUTO_UPDATE_DISABLED\": ((false)|(true))/\"IS_AUTO_UPDATE_DISABLED\": false/g" \
"$ROOT/$ELECTRON_ENV_FILE_NAME"; rm -f "$ROOT/$ELECTRON_ENV_FILE_NAME.bak"
fi

Expand Down
3 changes: 2 additions & 1 deletion src/auto-updater/toast-src/toast.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
body .swal2-container {
font-family: "Roboto", sans-serif;
font-family: "Inter", sans-serif;
font-feature-settings: 'tnum';
margin: 0;
}

Expand Down
6 changes: 3 additions & 3 deletions src/helpers/get-ui-fonts-as-css-string.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ const path = require('path')

const fontsPath = path.join(rootPath, 'bfx-report-ui/build/fonts/')
const fontsStyle = fs.readFileSync(
path.join(fontsPath, 'roboto.css'),
path.join(fontsPath, 'inter.css'),
'utf8'
)
const fStyleWithNormalizedPaths = fontsStyle.replace(
/url\(\.\/(.*\..*)\)/g,
`url(${fontsPath}$1)`
/url\('\.\/(.*\..*)'\)/g,
`url('${fontsPath}$1')`
)

module.exports = () => fStyleWithNormalizedPaths
3 changes: 2 additions & 1 deletion src/modal-dialog-src/modal-dialog.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
body .swal2-container {
font-family: "Roboto", sans-serif;
font-family: "Inter", sans-serif;
font-feature-settings: 'tnum';
}

body::-webkit-scrollbar,
Expand Down
5 changes: 3 additions & 2 deletions src/window-creators/layouts/app-init-error.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="shortcut icon" href="../../../bfx-report-ui/build/favicon.ico">
<link href="../../../bfx-report-ui/build/fonts/roboto.css" rel="stylesheet">
<link href="../../../bfx-report-ui/build/fonts/inter.css" rel="stylesheet">
<title>Bitfinex Reports</title>
<style>
html {
Expand All @@ -20,7 +20,8 @@
justify-content: center;
text-align: center;
background-color: #172d3e;
font-family: "Roboto", sans-serif;
font-family: "Inter", sans-serif;
font-feature-settings: 'tnum';
}

.alert {
Expand Down
5 changes: 3 additions & 2 deletions src/window-creators/layouts/app-init.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="shortcut icon" href="../../../bfx-report-ui/build/favicon.ico">
<link href="../../../bfx-report-ui/build/fonts/roboto.css" rel="stylesheet">
<link href="../../../bfx-report-ui/build/fonts/inter.css" rel="stylesheet">
<title>Bitfinex Reports</title>
<style>
html {
Expand All @@ -19,7 +19,8 @@
margin: 0;
text-align: center;
background-color: #172d3e;
font-family: "Roboto", sans-serif;
font-family: "Inter", sans-serif;
font-feature-settings: 'tnum';
}

.win-control-btn {
Expand Down

0 comments on commit d10f2bd

Please sign in to comment.