UI: Redesign/organize settings page #753

Open
chakflying wants to merge 8 commits from chakflying/settings-redesign into master
chakflying commented 3 years ago (Migrated from github.com)
Owner

As mentioned, the settings page is rapidly getting cluttered with different sections. The Save button is also in an awkward place as only some settings needs to be manually saved. I think a better design would be to have sections on the left side, and the main pane shows settings of this section only. The "Save" button can then appear only if that page needs to be saved.

image

As mentioned, the settings page is rapidly getting cluttered with different sections. The `Save` button is also in an awkward place as only some settings needs to be manually saved. I think a better design would be to have sections on the left side, and the main pane shows settings of this section only. The "Save" button can then appear only if that page needs to be saved. ![image](https://user-images.githubusercontent.com/3271800/138082992-733e365c-859b-47c5-b10f-5a690b0553e7.png)
louislam commented 3 years ago (Migrated from github.com)
Owner

I personally prefer to always show the monitor list, what do you think if implemented like this:

image

I personally prefer to always show the monitor list, what do you think if implemented like this: ![image](https://user-images.githubusercontent.com/1336778/138100181-8c5859d8-acf9-4d1d-985d-44b6465ee752.png)
chakflying commented 3 years ago (Migrated from github.com)
Poster
Owner

I think it works for GitHub because there is a clear hierarchy of "most of the time you only need code, issues, and PRs" and they can just hide the rest as the screen width changes. But we don't really have that, and I also rarely see settings sub-pages get separated into tabs like that. How about we split the settings pane itself then?

image

I think it works for GitHub because there is a clear hierarchy of "most of the time you only need code, issues, and PRs" and they can just hide the rest as the screen width changes. But we don't really have that, and I also rarely see settings sub-pages get separated into tabs like that. How about we split the settings pane itself then? ![image](https://user-images.githubusercontent.com/3271800/138404681-755035cb-6795-4243-be94-ff3906294683.png)
louislam commented 3 years ago (Migrated from github.com)
Owner

I think it works for GitHub because there is a clear hierarchy of "most of the time you only need code, issues, and PRs" and they can just hide the rest as the screen width changes. But we don't really have that, and I also rarely see settings sub-pages get separated into tabs like that. How about we split the settings pane itself then?

image

This is unexpectedly better looking than I thought. Let's take this way.

> I think it works for GitHub because there is a clear hierarchy of "most of the time you only need code, issues, and PRs" and they can just hide the rest as the screen width changes. But we don't really have that, and I also rarely see settings sub-pages get separated into tabs like that. How about we split the settings pane itself then? > > ![image](https://user-images.githubusercontent.com/3271800/138404681-755035cb-6795-4243-be94-ff3906294683.png) This is unexpectedly better looking than I thought. Let's take this way.
deefdragon commented 3 years ago (Migrated from github.com)
Owner

I personally see UK as about 3 key features, the monitoring, the notifications, and the status pages, and I am wondering if notifications should get their own section like the dashboard. Should #233 et. all, be accounted for and space prepared ahead of time while the settings are getting updated? Or should that be delegated to a separate PR? (I assume the latter, but worth bringing up.)

I personally see UK as about 3 key features, the monitoring, the notifications, and the status pages, and I am wondering if notifications should get their own section like the dashboard. Should #233 et. all, be accounted for and space prepared ahead of time while the settings are getting updated? Or should that be delegated to a separate PR? (I _assume_ the latter, but worth bringing up.)
chakflying commented 3 years ago (Migrated from github.com)
Poster
Owner

Are you talking about adding a completely new page to manage notifications settings? IMO a lot of them are and will be "per monitor" rather than global, so I don't see the need. Also, the status page currently manages its own settings. It would be debatable if in the future "multiple status pages" becomes a thing, the settings page be a place to manage it. But I'm also not sure. But this refactor would at least convert each settings sub-section to its own component, so future expansion would be easier and more organized.

Are you talking about adding a completely new page to manage notifications settings? IMO a lot of them are and will be "per monitor" rather than global, so I don't see the need. Also, the status page currently manages its own settings. It would be debatable if in the future "multiple status pages" becomes a thing, the settings page be a place to manage it. But I'm also not sure. But this refactor would at least convert each settings sub-section to its own component, so future expansion would be easier and more organized.
louislam commented 3 years ago (Migrated from github.com)
Owner

image

@chakflying's implementation is preferred.

> ![image](https://user-images.githubusercontent.com/3271800/138404681-755035cb-6795-4243-be94-ff3906294683.png) @chakflying's implementation is preferred.
chakflying commented 3 years ago (Migrated from github.com)
Poster
Owner

@louislam still working through this, but using $parent.$parent.settings already seem like a phenomenally bad idea. Do you think each settings sub-page should manage its own state instead?

@louislam still working through this, but using `$parent.$parent.settings` already seem like a phenomenally bad idea. Do you think each settings sub-page should manage its own state instead?
louislam commented 3 years ago (Migrated from github.com)
Owner

@louislam still working through this, but using $parent.$parent.settings already seem like a phenomenally bad idea. Do you think each settings sub-page should manage its own state instead?

I think we can put into a function that returns $parent.$parent.settings in this stage.

> @louislam still working through this, but using `$parent.$parent.settings` already seem like a phenomenally bad idea. Do you think each settings sub-page should manage its own state instead? I think we can put into a function that returns `$parent.$parent.settings` in this stage.
louislam (Migrated from github.com) reviewed 3 years ago
louislam (Migrated from github.com) commented 3 years ago
Owner

Using vue-router would be better, since vue-router handled browser history and the back button action gracefully. Also user could go to the page with a direct link like http://localhost/settings/appearance

<router-link>

Using vue-router would be better, since vue-router handled browser history and the back button action gracefully. Also user could go to the page with a direct link like `http://localhost/settings/appearance` `<router-link>`
louislam (Migrated from github.com) commented 3 years ago
Owner

<router-view />

`<router-view />`
chakflying commented 3 years ago (Migrated from github.com)
Poster
Owner

Tested the tests work locally, but it fails on GitHub for seemingly no reason...

Tested the tests work locally, but it fails on GitHub for seemingly no reason...
louislam commented 3 years ago (Migrated from github.com)
Owner

Tested the tests work locally, but it fails on GitHub for seemingly no reason...

I had similar experience, I found that jest + puppeteer is really hard to use especially on GitHub Action, because their machine is too slow.

> Tested the tests work locally, but it fails on GitHub for seemingly no reason... I had similar experience, I found that jest + puppeteer is really hard to use especially on GitHub Action, because their machine is too slow.
chakflying commented 3 years ago (Migrated from github.com)
Poster
Owner

I think it's finally fixed.

I think it's finally fixed.
chakflying commented 3 years ago (Migrated from github.com)
Poster
Owner

@louislam I think I found a bug while writing tests that "Disable Auth" currently breaks the settings page because of #772. jwtDecode would fail since the token is set to autoLogin. I can add a fix here, or if you think you won't merge this soon we can add a separate fix first.

@louislam I think I found a bug while writing tests that "Disable Auth" currently breaks the settings page because of #772. `jwtDecode` would fail since the token is set to `autoLogin`. I can add a fix here, or if you think you won't merge this soon we can add a separate fix first.
louislam commented 3 years ago (Migrated from github.com)
Owner

@louislam I think I found a bug while writing tests that "Disable Auth" currently breaks the settings page because of #772. jwtDecode would fail since the token is set to autoLogin. I can add a fix here, or if you think you won't merge this soon we can add a separate fix first.

Ops, does it crash the whole setting page? If yes, it would be great if we fix it first

> @louislam I think I found a bug while writing tests that "Disable Auth" currently breaks the settings page because of #772. `jwtDecode` would fail since the token is set to `autoLogin`. I can add a fix here, or if you think you won't merge this soon we can add a separate fix first. Ops, does it crash the whole setting page? If yes, it would be great if we fix it first
louislam commented 3 years ago (Migrated from github.com)
Owner
Fixed in [95bae8289d3a391065e66673cd969c63b7101ef2](https://github.com/louislam/uptime-kuma/commit/95bae8289d3a391065e66673cd969c63b7101ef2)
This pull request can be merged automatically.
You are not authorized to merge this pull request.
Sign in to join this conversation.
Loading…
There is no content yet.