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

Mimir admin landing CSS #1482

Merged
merged 2 commits into from
Mar 15, 2022
Merged

Mimir admin landing CSS #1482

merged 2 commits into from
Mar 15, 2022

Conversation

colega
Copy link
Contributor

@colega colega commented Mar 15, 2022

What this PR does

This adds some CSS styling to the Mimir's admin landing page.

Embeds basic CSS (Bootstrap) and JS (jQuery) dependencies to this repository so we don't need to fetch stuff from the internet, which opens the door for better inner components' tables, etc.

I can't keep working on this due to higher priorities, but I'd like to hear opinions (I have some offline ones already)

Preview

I've refactored the landing page to be categorised by component, with specific links in the dropdowns:
image

image

image

Even though I tried to keep everything simple, I'm still doubtful about dropdowns, and would like to hear opinions.

Which issue(s) this PR fixes or relates to

None, this was my hackathon-ish work during oncall.

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

This adds some CSS styling to the mimir admin.
Brings basic CSS and JS (jQuery) dependencies to this repository so we
don't need to fetch stuff from the internet, which opens the door for
better inner tables, etc.

Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
@colega colega marked this pull request as ready for review March 15, 2022 08:19
@pracucci pracucci self-requested a review March 15, 2022 10:00
Copy link
Collaborator

@pracucci pracucci left a comment

Choose a reason for hiding this comment

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

I love it! Please ship it (just left few nits). Looking forward for the tables styling!

P.S. I think dropdown menus are fine!

pkg/api/api.go Outdated Show resolved Hide resolved
pkg/api/api.go Outdated Show resolved Hide resolved
pkg/api/api.go Outdated Show resolved Hide resolved
}

func (pc *IndexPageContent) AddLink(section, path, description string) {
type IndexPageNavElement struct {
weight int
Copy link
Collaborator

Choose a reason for hiding this comment

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

Other fields are exposed, but weight is not. Any specific reason?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is only used to sort the items before providing them to the template, but template doesn't need to know about the weight.

Co-authored-by: Marco Pracucci <marco@pracucci.com>
@colega colega merged commit f916346 into main Mar 15, 2022
@colega colega deleted the mimir-css branch March 15, 2022 12:03
colega added a commit that referenced this pull request Mar 15, 2022
Was so excited about merging that I forgot to update the CHANGELOG.md

Ref: #1482

Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
pracucci pushed a commit that referenced this pull request Mar 15, 2022
Was so excited about merging that I forgot to update the CHANGELOG.md

Ref: #1482

Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
@pstibrany
Copy link
Member

Based on screenshot only: hiding links behind disclosure buttons makes them more difficult to find. I would prefer to have all actions visible (and searchable via browser search function) when I visit the admin page, although some CSS to split sections and make it nicer overall would be welcome.

@colega
Copy link
Contributor Author

colega commented Mar 16, 2022

I will revisit this 👍

@pstibrany
Copy link
Member

I will revisit this 👍

Thank you!

@pracucci pracucci mentioned this pull request Mar 21, 2022
3 tasks
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.

3 participants