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

enhancement: default open Jan Input Box Settings and Right panel #4234

Merged
merged 2 commits into from
Dec 5, 2024

Conversation

urmauur
Copy link
Member

@urmauur urmauur commented Dec 5, 2024

Describe Your Changes

changes made to three files in a codebase: Responsive.tsx, App.atom.ts, and Thread.atom.ts. Here's a summary of each change:

  1. Responsive.tsx:

    • The initial values for the refs lastLeftPanelState and lastRightPanelState have been modified. Previously, these refs were initialized as true for both, but now they are initialized using the current state values of showLeftPanel and showRightPanel.
    • This change ensures that when switching to a state where the panels should close, their last states are known from the outset.
  2. App.atom.ts:

    • An import of atomWithStorage from jotai/utils was added, which allows creating a persistent atom.
    • showRightPanelAtom is modified to use atomWithStorage, meaning it will now persist the panel's state using local storage under the key SHOW_RIGHT_PANEL. The default state of this atom is changed from true to false.
    • This change persists the panel's open/close state even after the application reloads, with the state being initially closed by default.
  3. Thread.atom.ts:

    • The default value of activeSettingInputBoxAtom was changed from false to true.
    • This change sets the active setting input box state to be true by default, which means the input box might now be in the active/open state when the application loads.

These changes generally deal with the default states and durability (persistent state) of UI components and user inputs.

Screen when fresh install

CleanShot 2024-12-05 at 15 55 42

Create new thread
CleanShot 2024-12-05 at 15 56 10

Create new thread when rightpanel open

CleanShot 2024-12-05 at 15 56 29

When create new thread Right panel and Chat input box setting will depends on local storage

Fixes Issues

Self Checklist

  • Added relevant comments, esp in complex areas
  • Updated docs (for bug fixes / features)
  • Created issues for follow-up changes or refactoring needed

@urmauur urmauur added the type: enhancement Improves a current feature label Dec 5, 2024
@urmauur urmauur added this to the v0.5.12 milestone Dec 5, 2024
@urmauur urmauur requested review from louis-jan and a team December 5, 2024 09:11
@urmauur urmauur self-assigned this Dec 5, 2024
Copy link
Contributor

github-actions bot commented Dec 5, 2024

Barecheck - Code coverage report

Total: 69.3%

Your code coverage diff: 0.04% ▴

Uncovered files and lines
FileLines
web/helpers/atoms/Thread.atom.ts90-93, 96, 110, 146-147, 152, 162-164, 168

@urmauur urmauur merged commit 1c80cb2 into dev Dec 5, 2024
9 checks passed
@urmauur urmauur deleted the enhance/default-screen-setting branch December 5, 2024 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Improves a current feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

enhancement: Default open Jan Input Box Settings when users first install app & download models
2 participants