Skip to content

Simplify the UiSettings API #136

@gkrajniak

Description

@gkrajniak

At the momemnt we have the interface

interface UiSettings {
  displayAs?:       'secret' | 'boolIcon' | 'link' | 'tooltip' | 'alert' | 'img' | 'button';
  buttonSettings?:  ButtonSettings;
  tooltipIcon?:     string;
  withCopyButton?:  boolean;
  labelDisplay?:    boolean;
  cssCustomization?: Partial<CSSStyleDeclaration>;
  cssRules?:        CssRule[];
  columnWidth?:     string;
  align?:           'start' | 'center' | 'end';
}

for the interface FieldDefinition, which can be simplified withe the labelDisplay?: boolean; part. Instead of having it as a separate flag we can have the logic along with the displayAs field, adding tag

we might need to extend the model with the ui5 properties ofd <ui5-tag>

export interface TagSettings {
  design?: 'Neutral' | 'Positive' | 'Critical' | 'Negative' | 'Information' | 'Set1' | 'Set2';
  colorScheme?: string;
}

and use the https://ui5.github.io/webcomponents/components/Tag/ beneth insted of the custom implementation.
In the solution we might consider tackling the comma separation values as a stream of values.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No fields configured for Task.

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions