UI: Redesign/organize settings page
#753
Open
chakflying wants to merge 8 commits from chakflying/settings-redesign
into master
pull from: chakflying/settings-redesign
merge into: topaLE:master
topaLE:1.6.X
topaLE:1.7.X
topaLE:1.9.X
topaLE:Mikhail5555/feature/remote-header-auth
topaLE:Nuckerr/master
topaLE:Saibamen/fix_871
topaLE:WillianRod/feat/add-favicon-badges
topaLE:andreasbrett/logging
topaLE:andreasbrett/securepush
topaLE:bertyhell/bugfix/heartbeat-bar-animation
topaLE:bertyhell/feature/monitor-checks
topaLE:bertyhell/feature/translations-extraction-script
topaLE:cert-notification
topaLE:debian-docker
topaLE:deefdragon/Template-Engine
topaLE:deefdragon/notif-tests
topaLE:e2e-test
topaLE:fdcastel/push-api-tags
topaLE:free-disk-space
topaLE:ivanbratovic/http-basicauth
topaLE:ivanbratovic/improve-translatables
topaLE:k8s-unofficial
topaLE:lucasra1/overall_status
topaLE:master
topaLE:mhkarimi1383/master
topaLE:mrphuongbn/master
topaLE:no-need-build
topaLE:philippdormann/feature/release-management
topaLE:proffalken/feature/680_add_labels_to_prometheus_metrics
topaLE:proffalken/feature/auto_build_and_release
topaLE:rebasesoftware/feature/request-with-http-proxy
topaLE:restructure-status-page
topaLE:sqlite-upgrade-prebuilt
topaLE:tarun7singh/master
topaLE:thomasleveil/feature/565-duplicate-monitor
topaLE:thomasleveil/ux/add-group-at-the-top
Reviewers
Request review
No reviewers
Labels
Something isn't working dependencies
Pull requests that update a dependency file discussion doc
Improvements or additions to documentation duplicate
This issue or pull request already exists feature-request
New feature or request good first issue
Good for newcomers hacktoberfest hacktoberfest-accepted help help wanted
Extra attention is needed High
High Priority impossible invalid
This doesn't seem right investigating k8s Low
Low Priority Medium
Medium Priority News prerelease bug question
Further information is requested resolved Unknown wontfix
This will not be worked on
Apply labels
Clear labels
bug
Something isn't working dependencies
Pull requests that update a dependency file discussion doc
Improvements or additions to documentation duplicate
This issue or pull request already exists feature-request
New feature or request good first issue
Good for newcomers hacktoberfest hacktoberfest-accepted help help wanted
Extra attention is needed High
High Priority impossible invalid
This doesn't seem right investigating k8s Low
Low Priority Medium
Medium Priority News prerelease bug question
Further information is requested resolved Unknown wontfix
This will not be worked on
No Label
bug
dependencies
discussion
doc
duplicate
feature-request
good first issue
hacktoberfest
hacktoberfest-accepted
help
help wanted
High
impossible
invalid
investigating
k8s
Low
Medium
News
prerelease bug
question
resolved
Unknown
wontfix
Milestone
Set milestone
Clear milestone
No items
No Milestone
Projects
Clear projects
No project
Assignees
Assign users
Clear assignees
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.
No due date set.
Dependencies
This pull request currently doesn't have any dependencies.
Reference in new issue
There is no content yet.
Delete Branch 'chakflying/settings-redesign'
Deleting a branch is permanent. It CANNOT be undone. Continue?
No
Yes
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.I personally prefer to always show the monitor list, what do you think if implemented like this:
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?
This is unexpectedly better looking than I thought. Let's take this way.
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.)
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.
@chakflying's implementation is preferred.
@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.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>
<router-view />
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.
I think it's finally fixed.
@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 toautoLogin
. 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
Fixed in 95bae8289d3a391065e66673cd969c63b7101ef2