-
Notifications
You must be signed in to change notification settings - Fork 489
Show octant route history in the header #2580
Show octant route history in the header #2580
Conversation
Consider the following scenario: The user has switched namespaces multiple times then proceeded to visit Two approaches come to mind for tacking this problem:
|
182306e
to
d12e357
Compare
Adding namespace to the history is straightforward as it is already a part of content response and since history is for octant app, showing scoped history makes sense. |
44f6bc1
to
eb1a127
Compare
Please add a changelog entry for this. |
c95ae58
to
d87441a
Compare
web/src/app/modules/sugarloaf/components/smart/container/container.component.spec.ts
Outdated
Show resolved
Hide resolved
d87441a
to
cc0ea46
Compare
web/src/app/modules/sugarloaf/components/smart/container/container.component.ts
Show resolved
Hide resolved
web/src/app/modules/sugarloaf/components/smart/container/container.component.ts
Outdated
Show resolved
Hide resolved
web/src/app/modules/sugarloaf/components/smart/container/container.component.html
Show resolved
Hide resolved
web/src/app/modules/sugarloaf/components/smart/container/container.component.spec.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It LGTM, the only two things and both of them don't really apply to the electron app
- if I start Octant on an specific URL like
http://localhost:7777/#/cluster-overview/namespaces
this URL does not get saved on the History, I think Sam point out that as well () - And if the page does not load completely is does not show in history
|
||
func getNamespace(state octant.State, contentPath string, cm *ContentManager) string { | ||
m, ok := cm.moduleManager.ModuleForContentPath(contentPath) | ||
if ok && m.Name() == "cluster-overview" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Every time I read this if
it takes me a while to realize why is there, just a suggestion, it will be nice a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It LGTM, the only two things and both of them don't really apply to the electron app
- if I start Octant on an specific URL like
http://localhost:7777/#/cluster-overview/namespaces
this URL does not get saved on the History, I think Sam point out that as well ()- And if the page does not load completely is does not show in history
@lenriquez your second point is valid. I thought about it as well. I was thinking that a user has not successfully landed on a page unless the content is not yet rendered and hence, history uses content event to determine successful routing.
8a7ec76
to
9908802
Compare
@GuessWhoSamFoo @lenriquez This feature can be improved further by using local storage so that the history is not lost on page refresh. I'm working on adding this as this greatly improve the experience. |
9908802
to
2c5b6e1
Compare
One final task this, needs prettier run
|
- Show descriptive page title - Update octant content response to return empty namespace for non-namespaced resources [vmware-archive#2472, vmware-archive#2640] Signed-off-by: Vikram Yadav <yvikram@vmware.com>
2c5b6e1
to
acc9227
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done
What this PR does / why we need it:
Which issue(s) this PR fixes