Skip to content

TabsetPanel setTabPlacement  #513

@fls-indinf

Description

@fls-indinf

The feature of chaning the tab placement seems to be missing/unimplemented.

// ITabsetPanel.java

/** the constant value for top tab placement. */
public static final int PLACEMENT_TOP = 1;

/** the constant value for left tab placement. */
public static final int PLACEMENT_LEFT = 2;

/** the constant value for bottom tab placement. */
public static final int PLACEMENT_BOTTOM = 3;

/** the constant value for right tab placement. */
public static final int PLACEMENT_RIGHT = 4;

/**
* Sets the tab placement.
* 
* @param pPlacement one of the following values: {@link #PLACEMENT_TOP}, {@link #PLACEMENT_LEFT}, 
*                   {@link #PLACEMENT_RIGHT}, {@link #PLACEMENT_BOTTOM} 
*/
public void setTabPlacement(int pPlacement);

/**
* Gets the tab placement.
* 
* @return one of the following values: {@link #PLACEMENT_TOP}, {@link #PLACEMENT_LEFT},
*         {@link #PLACEMENT_RIGHT}, {@link #PLACEMENT_BOTTOM}
*/
public int getTabPlacement();

It would be a nice feature, because more and more users moving towards:

  1. Widescreens, so they can preserve more vertical UI space
  2. the feature Chrome/Edge introduced, to place the tabs of a browser vertically (usually on the left side) (in collapsable groups).

The current UITabsetPanel/TabsetPanelImpl API does not seem to be open enough, to fix it/work around this ourselfes.
Changing it by just adding CSS (display flex, flex-direction: column, ..) to the elements seems to break the layouting, due to the LayoutContext not being accessible - afaik.

grafik
grafik

.p-tabview.p-component { // Tabview
  display: flex;
  flex-direction: row;
}
 
.p-tabview-nav-link {
  border-bottom: none;
  border-right: 2px solid var(--surface-border);
}
 
.p-tabview-nav {
  display: flex;
  flex-direction: column;
  border-width: 0;
  border-right-width: 2px;
}

Trying to sneak these styles onto the effective component by using the forwardedRef would not change the layouting, since the height still being added to the overall height. This causes the TabsetPanel to overflow the screen area.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions