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

Add two columns Settings layout #592

Merged
merged 10 commits into from
Apr 23, 2024
Merged

Add two columns Settings layout #592

merged 10 commits into from
Apr 23, 2024

Conversation

menghif
Copy link
Collaborator

@menghif menghif commented Apr 16, 2024

Fixes #578

This PR changes the Settings layout by adding a sidebar to the left.

As previously suggested, I split the Settings into one category for Providers, GPT Models and Temperature, then I moved everything else into a "Customization" category.

I moved Web Handlers into Settings and, for consistency, I moved the Default System Prompts as well.

Desktop preview:

Screenshot 2024-04-15 at 20 18 27

Mobile preview:

Screenshot 2024-04-15 at 20 38 33

@menghif menghif self-assigned this Apr 16, 2024
@humphd humphd requested review from kliu57 and Amnish04 April 16, 2024 00:38
@humphd
Copy link
Collaborator

humphd commented Apr 16, 2024

This is exciting to see happening!

Copy link
Collaborator

@kliu57 kliu57 left a comment

Choose a reason for hiding this comment

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

I tested this and it works very well!

@tarasglek
Copy link
Owner

This looks amazing, is this ready for review or are you still working on it?

@menghif
Copy link
Collaborator Author

menghif commented Apr 18, 2024

It's ready for review!

Copy link
Collaborator

@Amnish04 Amnish04 left a comment

Choose a reason for hiding this comment

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

@menghif This is a huge improvement, and kinda impressive how fast you have been with this!

I haven't read the code yet, but had some UX suggestions:

  1. I would prefer to have the selected setting type list item to be highlighted in a bluish shade that is similar to accent color of this application. I think blue.500 should look good.
    image

  2. I noticed that the modal height changes based on what settings type is selected. It would be better if the height of our modal is fixed and we allow the inner body of the modal to scroll. (https://v2.chakra-ui.com/docs/components/modal#modal-overflow-behavior)

  3. In the mobile preview, the modal takes full viewport width and touches the edges. It would be better to leave some gap. Maybe try 95vw?
    image

  4. In mobile preview, it would be better if the settings selection control was a dropdown list, so we don't occupy unnecessary real estate on screen.
    image

@humphd
Copy link
Collaborator

humphd commented Apr 20, 2024

@menghif can you rebase this to pick up the changes on main?

menghif added 4 commits April 20, 2024 13:57
Split previous settings into Models and Customization sections
Move Web Handlers and Default System Settings to the Settings Modal
Copy link

cloudflare-workers-and-pages bot commented Apr 20, 2024

Deploying chatcraft-org with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8e6513a
Status: ✅  Deploy successful!
Preview URL: https://dd7a8e3d.console-overthinker-dev.pages.dev
Branch Preview URL: https://issue-578.console-overthinker-dev.pages.dev

View logs

@menghif
Copy link
Collaborator Author

menghif commented Apr 20, 2024

@menghif can you rebase this to pick up the changes on main?

Rebased. I made some changes last night based on @Amnish04 feedback but that's still a work in progress.

@humphd
Copy link
Collaborator

humphd commented Apr 20, 2024

I'm loving this. There are some things I think we need to do after this (e.g., split providers from models, show your list of providers on the left under "Providers"), but none of it needs to block this.

I'll let you iterate with @Amnish04, but this is really coming along nicely. Thank you!

@Amnish04
Copy link
Collaborator

Amnish04 commented Apr 21, 2024

Rebased. I made some changes last night based on @Amnish04 feedback but that's still a work in progress.

@menghif I saw that you are now embedding the settings type selection list into an Accordion on smaller screens.

I was wondering if we could hide the already selected item from the drop list, as it feels redundant.

image

Or if possible, we could convert this to a Select dropdown list.

@tarasglek
Copy link
Owner

We can land this as is and iterate on mobile tweaks incrementally.

@humphd
Copy link
Collaborator

humphd commented Apr 22, 2024

Agree, @menghif file a follow-up for whatever is left and get this in. It's awesome.

Copy link
Collaborator

@Amnish04 Amnish04 left a comment

Choose a reason for hiding this comment

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

I also agree. We can improve in follow-ups.

Thanks for the improvements!

@menghif
Copy link
Collaborator Author

menghif commented Apr 22, 2024

I was working on this yesterday and made the change to set the Modal's height as fixed and only allow the inner body to scroll.

I still have an overflow bug with the Web Handlers body but I can include that in a follow up issue.

It's ready for a final review now!

@humphd
Copy link
Collaborator

humphd commented Apr 23, 2024

@menghif land this when you're ready and anything else can happen in follow ups.

Amazing work getting this done so fast.

@menghif menghif merged commit e4967a9 into main Apr 23, 2024
4 checks passed
@tarasglek
Copy link
Owner

@menghif this is a huge improvement in my life :)

@menghif menghif deleted the issue-578 branch June 17, 2024 21:13
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.

Create Two-Column Modal component
5 participants