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

Page layout allows for buttons in-line with page title #2302

Closed
pivotal-mikegresham opened this issue Apr 12, 2021 · 4 comments · Fixed by #2407
Closed

Page layout allows for buttons in-line with page title #2302

pivotal-mikegresham opened this issue Apr 12, 2021 · 4 comments · Fixed by #2407
Assignees
Labels
api enhancement New feature or request ui

Comments

@pivotal-mikegresham
Copy link

Describe the problem/challenge you have
Currently, the page layout doesn't allow for a button inline with the title. Adding buttons creates a row that adds page height and is misaligned.

Describe the solution you'd like
We would like to have some action buttons right-aligned, inline with the title.

Example: Screen Shot 2021-04-12 at 10 37 21

@wwitzel3 wwitzel3 added api enhancement New feature or request ui labels Apr 12, 2021
@wwitzel3
Copy link
Contributor

I think this would involve extending the Title to support taking a ButtonGroup, similar to what we do for flex layout to allow it to have a button group associated with it. /~https://github.com/vmware-tanzu/octant/blob/master/pkg/view/component/flexlayout.go#L57

I don't think we want to make buttons and buttons groups a supported title component type, since I think we'd want to not have the buttons be part of the breadcrumbs for the title.

That said, it might involve needing to refactor the way we think about title components .. since right now they are a list of components that are marked as being suitable for titles.

@ftovaro
Copy link
Contributor

ftovaro commented Apr 16, 2021

Hi, I can work in the extension of the TitleComponent to receive a Button or ButtonGroup.

That said, I was thinking to receive an array of Buttons or a single ButtonGroup, what do you think is the best here? Or should the TitleComponent be able to receive both? What do you think?

@GuessWhoSamFoo
Copy link
Contributor

It should be an arbitrary component. The distinction between a button group vs three individual button components is that a button group is for similarly grouped tasks. However, it is up to the plugin developer to choose. We're interested allowing titles to be inline with another component under a given flex layout section.

@ftovaro
Copy link
Contributor

ftovaro commented Apr 20, 2021

Just an update:

We asked Mike if in the issue he was talking about adding components to any title or just a page title.
The answer was that is was needed just for the title.

So, what we have to do is extend the TitleComponent to receive any other component.

Issues about this approach:

  1. Styling of the tiles, organize them to be align with the component (buttons, etc)
  2. How to receive the new components
  3. what happens if the plugin author just inject a lot of components.

And so on.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api enhancement New feature or request ui
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants