-
Notifications
You must be signed in to change notification settings - Fork 18
refactor: Centralize hash parameter handling (fixes #342, #348); Simplify line number updates (fixes #346). #351
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
Changes from all commits
112d486
1785afe
6f65b76
d176907
ed36392
d171554
471e1e3
3381a3b
89fdbd1
2256793
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,14 +14,18 @@ import AutoFixOffIcon from "@mui/icons-material/AutoFixOff"; | |
import useLogFileStore from "../../stores/logFileStore"; | ||
import useUiStore from "../../stores/uiStore"; | ||
import useViewStore from "../../stores/viewStore"; | ||
import {UI_ELEMENT} from "../../typings/states"; | ||
import { | ||
UI_ELEMENT, | ||
UI_STATE, | ||
} from "../../typings/states"; | ||
import {HASH_PARAM_NAMES} from "../../typings/url"; | ||
import {ACTION_NAME} from "../../utils/actions"; | ||
import {isDisabled} from "../../utils/states"; | ||
import { | ||
copyPermalinkToClipboard, | ||
updateWindowUrlHashParams, | ||
} from "../../utils/url"; | ||
import {updateViewHashParams} from "../../utils/url/urlHash"; | ||
import LogLevelSelect from "./LogLevelSelect"; | ||
import StatusBarToggleButton from "./StatusBarToggleButton"; | ||
|
||
|
@@ -50,14 +54,13 @@ const StatusBar = () => { | |
const {actionName} = ev.currentTarget.dataset; | ||
|
||
switch (actionName) { | ||
case ACTION_NAME.TOGGLE_PRETTIFY: { | ||
case ACTION_NAME.TOGGLE_PRETTIFY: | ||
updateWindowUrlHashParams({ | ||
[HASH_PARAM_NAMES.IS_PRETTIFIED]: false === isPrettified, | ||
}); | ||
const {updateIsPrettified} = useViewStore.getState(); | ||
updateIsPrettified(!isPrettified); | ||
useUiStore.getState().setUiState(UI_STATE.FAST_LOADING); | ||
updateViewHashParams(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I appreciate this change, but this removes the progress bar after clicking isPrettified button. Can we rethink about where to set UI_STATE, we probably can either
Personally, I feel we can do a hot fix in this pr: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's do a hot fix and address the issue later. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @coderabbitai can you create an issue on this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chainI'll create an issue to track the UI state management cleanup that was discussed. @hoophalab I've created an issue to track the UI state management cleanup that was discussed. The issue references this PR and the specific discussion, describes the problem with the progress bar, mentions the hot fix that was implemented, and includes the longer-term solutions you suggested. 🏁 Script executed:
Length of output: 1261 @hoophalab Perfect! I've successfully created issue #355 to track the UI state management cleanup: #355 The issue has been assigned to you and includes:
This will help track the follow-up work needed to clean up the UI state management after the refactoring is complete. 🧬 Code Graph Analysis ResultsRelevant snippets for
|
||
break; | ||
} | ||
default: | ||
console.error(`Unexpected action: ${actionName}`); | ||
break; | ||
|
Uh oh!
There was an error while loading. Please reload this page.