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
Breadcrumb for the asset page #930
Conversation
Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
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.
Very nice addition!
One caveat: I guess we can have more than one parental layer.
E.g. Asset1 <- Asset2 <- Asset3
I believe this would then swallow the highest asset and only show:
Account - Asset2 - Asset3
Maybe we can update this, so parent_asset
becomes parent_assets
?
And extending to sensors would be great. I believe that is simpler (one asset per sensor), so that should use a big part of this code.
Please make an extra issue or include right here.
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.
Just a code review. Testing is next.
A couple more thoughts I had (just writing them down before I forget):
|
Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
…ure/ui/breadcrumb
True, now the function returns all the parental layers. A follow-up feature might be to limit the number of parental layers.
Good point, It's sometime hard to know which sensor you are looking and to what simulation it belongs. At the moment, we are looking at the tooltip an sensor name. |
Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
Currently, the parents are not guaranteed to belong to the same account.
Good point. Nonetheless, the number of parent layers will be pretty limited compared to the number of assets.
I've resized my window and it looks good to me. In that case, I see the text jumping to the next line.
This would be very nice. Also, we could think on navigating lower levels. For example, from an asset, list all the sensors and/or children. |
Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
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.
Approved, with two asks:
"breadcrumb": get_ancestry(entity),
-> change key to "ancestors"- changelog entry
(Note that I added a bit of CSS styling.)
Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
Signed-off-by: Victor <victor@seita.nl>
Signed-off-by: Victor <victor@seita.nl>
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.
Very cool, thanks.
Just one line that comes from a different PR and slipped through merging I guess.
Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
Description
So far, we have introduced the child-parent relationship which allows to define a hierarchy of Assets. This is very nice as to model complex relationships but currently we are unable to navigate the Asset tree through the UI.
Some time ago @GustaafL proposed to have a breadcrumb as a way to move around in FlexMeasures. This PR introduces a little breadcrumb that lets you go back to the parent asset page (if an asset has a parent) and the account page of current asset.
Look & Feel
How to test
Further Improvements