Skip to content
This repository has been archived by the owner on Jul 12, 2023. It is now read-only.

Tabbed navigation #617

Merged
merged 13 commits into from
Sep 22, 2020
Merged

Tabbed navigation #617

merged 13 commits into from
Sep 22, 2020

Conversation

whaught
Copy link
Contributor

@whaught whaught commented Sep 21, 2020

Proposed Changes

  • Switch to tabbed navigation
    • Gives user feedback on their current page
  • This gives the UI a lighter feel, let me know what you think. It's somewhat subjective.

Old

oldnav

New

newnav

Release Note

Switch navigation to light tabs

@googlebot googlebot added the cla: yes Auto: added by CLA bot when all committers have signed a CLA. label Sep 21, 2020
pkg/controller/middleware/currentpath.go Outdated Show resolved Hide resolved
}
}

func (p *Path) Path() string {
Copy link
Member

Choose a reason for hiding this comment

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

I still think there's going to be cases where we need a strings.Contains on these. What do you think about dangling functions off path like IsChild(s string) so we can call those in templates?

Copy link
Contributor Author

@whaught whaught Sep 22, 2020

Choose a reason for hiding this comment

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

Well the idea is we have the full Path():
/foo/bar/baz -> foo/bar/baz
Dir()
/foo/bar/baz -> /foo/bar
and File()
/foo/bar/baz -> baz

which I think pretty well covers what you'd want to match with eq. You can still do stringContains on any of em

Copy link
Member

Choose a reason for hiding this comment

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

Right, I'm more talking about the DevX in the template. Instead of stringsContains, we could write these functions to be able to be used like:

{{ .currentpath.IsDir("/foo") }}

versus

{{ stringsContains .currentpath.Dir "/foo" }}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh sure we can do that

Copy link
Member

@sethvargo sethvargo left a comment

Choose a reason for hiding this comment

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

/lgtm

@whaught can you remove the other injection in the template middleware in another PR?

@google-oss-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sethvargo, whaught

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-robot google-oss-robot merged commit 199ed9f into google:main Sep 22, 2020
@whaught whaught deleted the pretty-nav branch September 22, 2020 16:00
@google google locked and limited conversation to collaborators Oct 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes Auto: added by CLA bot when all committers have signed a CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants