Closed davemarco closed 5 days ago
The pull request introduces several modifications across various components and files. Key changes include the transition of state management for the settings modal to a context-based approach in the SidebarTabs
component, the addition of a primaryAction
property in the PopUpMessageBox
, and updates to the CSS for pop-up messages. Additionally, the SettingsDialog
component's helper text was clarified, and new functions related to format handling were added in the MainWorker
and decoder classes. Overall, the changes enhance state management, interactivity, and configuration handling within the application.
File Path | Change Summary |
---|---|
src/components/CentralContainer/Sidebar/SidebarTabs/index.tsx |
Removed local state for isSettingsModalOpen , now using context for state management. |
src/components/PopUps/PopUpMessageBox.tsx |
Added primaryAction property to message object; updated rendering logic for button display. |
src/components/PopUps/index.css |
Updated pop-up message CSS for improved layout; added new class .pop-up-message-box-alert-layout . |
src/components/modals/SettingsModal/SettingsDialog.tsx |
Updated helperText for configuration field in SettingsDialog . |
src/contexts/StateContextProvider.tsx |
Introduced isSettingsModalOpen state and updated context provider to manage this state. |
src/services/formatters/YscopeFormatter/index.ts |
Added jsonValueToString function; modified formatLogEvent to handle empty format strings. |
src/typings/notifications.ts |
Updated PopUpMessage interface to include primaryAction ; added LONG_AUTO_DISMISS_TIMEOUT_MILLIS . |
src/utils/config.ts |
Modified CONFIG_DEFAULT for formatString and refined validation logic in testConfig . |
src/services/MainWorker.ts |
Introduced postFormatPopup function to prompt user for format string replacement. |
src/services/decoders/ClpIrDecoder.ts |
Updated #formatter initialization; called postFormatPopup for empty formatString . |
src/services/decoders/JsonlDecoder/index.ts |
Added logic to call postFormatPopup if formatString is empty during initialization. |
src/typings/formatters.ts |
Updated capitalization of "Yscope" to "YScope" in comments and type definitions. |
src/typings/worker.ts |
Added FORMAT_POPUP to WORKER_RESP_CODE enum; updated WorkerRespMap type. |
SidebarTabs
component are directly related to the new tabbed sidebar introduced in this PR.SearchTabPanel
is directly related to the new search functionality added in this PR.SettingsDialog
are relevant to the new YScope formatter introduced in this PR.Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
This PR has been up 4 days without a review. What's the status?
This PR has been up 4 days without a review. What's the status?
I've been dealing with customer issues in the past two business days and there was no one else triaging the review. I'll take a look once I wrap a customer meeting, if there's no new priorities identified, in an hour.
I made requested changes. I also modified logic that triggers popup. Previously, the popup was triggered by front-end when file was opened. As you mentioned, not ideal since not all files are structured. It is not trivial to just check extension since the same extension for IRV1 and IRV2... Instead, I added functionality for the backend worker to trigger popup in front end. Now can trigger popup specifically when formatter in constructed in decoder constructor (i.e. triggered only for structured decoders). I also added a feature that closes the popup when you click the button.
Description
PR does three things
Adds special case to formatter for empty for string
PR modifies
YScopeFormatter
so that is will print all the log event fields as JSON when the format string is empty. This allows users to see their logs, so they know what fields to format. PR also sets the default format string to empty.Popup to remind users to set format string
PR adds a popup to notify users to set format string. The popup only appears when the format string is empty, i.e. the default. It will not appear if they change the format string. The popup opens when users open the file, not when the log viewer starts. I thought this was more appropriate because again they can only set the format string once they see their logs (i.e. after the file is open).
Support button on popup
I modified the popup and settings modal, so the popup can have a button to actually open the settings.
Validation performed
Tested empty format string, popup and button
Summary by CodeRabbit
Release Notes
New Features
Improvements
Bug Fixes