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

new-log-viewer: Implement MenuBar and StatusBar with JoyUI components; add JoyUI custom app theme. #59

Merged
merged 68 commits into from
Sep 12, 2024

Conversation

Henry8192
Copy link
Collaborator

@Henry8192 Henry8192 commented Aug 23, 2024

References

new-log-viewer series: #45 #46 #48 #51 #52 #53 #54 #55 #56 #57

Description

App Theme

Use JoyUI components for Button, Select, and Input. In App.js, CssVarsProvider is added as a root provider to provide styles for components described above.

Menu Bar

  • Four navigation buttons: used for jumping to first, previous, next and last page.
  • File open button: used for open a new file.
  • Settings button: used to set various options, like page size.
    • Theme toggle button: Toggle between light, dark and system.
  • Tips button: Show keyboard shortcuts. Currently is a no-op.

Status Bar

Display status message and a button displaying current log event number. onClick, the button will copy the permalink of the current line to clipboard.

Validation performed

Open log viewer.

Menu Bar Test

Settings Test

Click settings (gear) button, toggle theme from light, system and dark, observe the color change except the monaco editor. Set page size and verify using navigation buttons.

Navigation Test

Click the four navigation buttons. Observe the change showed in the monaco editor as well as logEventNum in browser's navigation bar. Make sure to set proper pageSize in settings.

Open File Test

Click file open button, open a jsonl file locally, observe that monaco editor opens the provided log file.

Status Bar Test

Copy Permalink To Clipboard Test

Click the blue button (Log Event [current log event num] of [total log events]), it will copy the current log event's permalink to the clipboard.

@Henry8192 Henry8192 changed the title WIP: add vscode theme for editor new-log-viewer: add vscode theme, menu bar and status bar Aug 31, 2024
@Henry8192 Henry8192 changed the title new-log-viewer: add vscode theme, menu bar and status bar new-log-viewer: add monaco theme, menu bar and status bar Aug 31, 2024
Copy link
Collaborator

@junhaoliao junhaoliao left a comment

Choose a reason for hiding this comment

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

Let's work on code organization before we proceed to the next iteration of review.

new-log-viewer/src/components/Layout.tsx Outdated Show resolved Hide resolved
new-log-viewer/src/components/Layout.tsx Outdated Show resolved Hide resolved
new-log-viewer/src/App.tsx Outdated Show resolved Hide resolved
new-log-viewer/src/App.tsx Outdated Show resolved Hide resolved
new-log-viewer/src/components/Layout.tsx Outdated Show resolved Hide resolved
new-log-viewer/src/components/Layout.tsx Outdated Show resolved Hide resolved
new-log-viewer/src/components/Layout.tsx Show resolved Hide resolved
new-log-viewer/src/components/Layout.tsx Outdated Show resolved Hide resolved
new-log-viewer/src/utils/config.ts Show resolved Hide resolved
new-log-viewer/src/utils/config.ts Show resolved Hide resolved
Copy link
Collaborator

@junhaoliao junhaoliao left a comment

Choose a reason for hiding this comment

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

lgtm

@junhaoliao junhaoliao changed the title new-log-viewer: add monaco theme, menu bar and status bar new-log-viewer: Implement MenuBar and StatusBar with JoyUI components; add JoyUI custom app theme. Sep 12, 2024
@junhaoliao junhaoliao merged commit cfa9274 into y-scope:main Sep 12, 2024
1 check passed
@Henry8192 Henry8192 deleted the editorTheme branch September 12, 2024 14:40
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