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

feat: complete re-design, responsive UI & dark mode #70

Merged
merged 29 commits into from
Jul 10, 2024
Merged

Conversation

fmaclen
Copy link
Owner

@fmaclen fmaclen commented Jul 7, 2024

Closes #12
Closes #14

These designs are still a moving target but I've more or less settled with this layout:

v3 - Session - light
v3 - Session -dark
v3 - New session-1

new session mobile
no sessions mobile
session mobile

@fmaclen fmaclen changed the title new sidebar feat: complete re-design, responsive UI & dark mode Jul 7, 2024
@raychz
Copy link

raychz commented Jul 9, 2024

Nice work, @fmaclen! 👍 🥳 I really like that you're adding in a toggle for "Auto Scroll"! The current version of Hollama's auto scroll is problematic if you try scrolling up while the LLM is still generating text. It also looks like you've added support for multiple knowledges/contexts (based on the screenshots above), so maybe #73 is unnecessary?

On another note, it'd be great to add in a "Moon" icon button to the menu that will toggle dark/light mode. From the screenshots, I'm guessing you've added this into the "Settings" page. Here are a couple of examples:

Moon icon in light mode:
Moon icon in light mode

Sun icon in dark mode:
Sun icon in dark mode

Copy link

Deploying hollama with  Cloudflare Pages  Cloudflare Pages

Latest commit: a938cc2
Status: ✅  Deploy successful!
Preview URL: https://5552bff3.hollama.pages.dev
Branch Preview URL: https://ui-redesign.hollama.pages.dev

View logs

@fmaclen
Copy link
Owner Author

fmaclen commented Jul 9, 2024

@raychz thanks!

The screenshots I included include a bunch of long-term plans, I'm not planning on this PR implementing a big chunk of it.

Here's a demo of the PR so far if you want to test-drive it: https://ui-redesign.hollama.pages.dev/settings
Colors are not final and it's only partially responsive.

I really like that you're adding in a toggle for "Auto Scroll"! The current version of Hollama's auto scroll is problematic if you try scrolling up while the LLM is still generating text.

Yeah, it's a bit broken. I essentially want it to be the behavior to be more predictable, more or less like Claude/ChatGPT #13

It also looks like you've added support for multiple knowledges/contexts (based on the screenshots above), so maybe #73 is unnecessary?

No, it is necessary! 💯
I won't be implementing that feature in this PR. I haven't had time to go through your suggestion in detail yet but I originally envisioned Knowledge as a collection of "knowledges" rather than a single document.

On another note, it'd be great to add in a "Moon" icon button to the menu that will toggle dark/light mode.

Yup, you can see that in the demo linked above. I added it on the sidebar for now but I think it should look different than the other buttons. I'll likely add a separate issue for that.

@fmaclen fmaclen marked this pull request as ready for review July 10, 2024 16:14
Comment on lines +18 to +28
function toggleTheme() {
theme = theme === 'light' ? 'dark' : 'light';
document.documentElement.setAttribute('data-color-theme', theme);
}

onMount(() => {
// Set initial theme based on user's browser preference
const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
theme = prefersDark ? 'dark' : 'light';
document.documentElement.setAttribute('data-color-theme', theme);
});
Copy link
Owner Author

Choose a reason for hiding this comment

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

REF #78

Comment on lines +6 to +13
// FIXME: This behavior may belong in hooks.client.ts
beforeUpdate(() => {
if (!$settingsStore?.ollamaServer) {
// FIXME:
// This should only rediect to /settings if the server is not connected
goto('/settings');
} else {
goto('/sessions');
Copy link
Owner Author

Choose a reason for hiding this comment

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

REF #79

Copy link
Owner Author

Choose a reason for hiding this comment

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

REF #80

@fmaclen fmaclen merged commit f019cd5 into main Jul 10, 2024
1 check passed
@fmaclen fmaclen deleted the ui-redesign branch July 10, 2024 22:45
@fmaclen
Copy link
Owner Author

fmaclen commented Jul 10, 2024

🎉 This PR is included in version 0.3.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mobile: make UI responsive Add light/dark mode toggle
2 participants