From 27a302de2d185d414f3888776947eaf81a609932 Mon Sep 17 00:00:00 2001 From: Lukas Matta Date: Thu, 28 Mar 2024 15:31:00 +0100 Subject: [PATCH 1/9] Annotate enums --- .../src/lib/components/cps-table/cps-column-filter-types.ts | 5 +++++ .../cps-notification/utils/cps-notification-config.ts | 2 ++ 2 files changed, 7 insertions(+) diff --git a/projects/cps-ui-kit/src/lib/components/cps-table/cps-column-filter-types.ts b/projects/cps-ui-kit/src/lib/components/cps-table/cps-column-filter-types.ts index 6853ea39..ef33ccb5 100644 --- a/projects/cps-ui-kit/src/lib/components/cps-table/cps-column-filter-types.ts +++ b/projects/cps-ui-kit/src/lib/components/cps-table/cps-column-filter-types.ts @@ -1,4 +1,9 @@ /* eslint-disable no-unused-vars */ + +/** + * CpsColumnFilterMatchMode is used to define how the filter value should be matched. + * @group Enums + */ export enum CpsColumnFilterMatchMode { STARTS_WITH = 'startsWith', CONTAINS = 'contains', diff --git a/projects/cps-ui-kit/src/lib/services/cps-notification/utils/cps-notification-config.ts b/projects/cps-ui-kit/src/lib/services/cps-notification/utils/cps-notification-config.ts index 4866401f..a76bd99a 100644 --- a/projects/cps-ui-kit/src/lib/services/cps-notification/utils/cps-notification-config.ts +++ b/projects/cps-ui-kit/src/lib/services/cps-notification/utils/cps-notification-config.ts @@ -2,6 +2,7 @@ /** * An enumeration of appearances of notifications. + * @group Enums */ export enum CpsNotificationAppearance { FILLED = 'filled', @@ -10,6 +11,7 @@ export enum CpsNotificationAppearance { /** * An enumeration of positions of notifications. + * @group Enums */ export enum CpsNotificationPosition { CENTER = 'center', From c19578fcc00268ae64f37a1303263818c83f8898 Mon Sep 17 00:00:00 2001 From: Lukas Matta Date: Thu, 28 Mar 2024 15:31:26 +0100 Subject: [PATCH 2/9] Update generator --- api-generator/api-generator.js | 39 +++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/api-generator/api-generator.js b/api-generator/api-generator.js index 9339004d..d1a00c2b 100644 --- a/api-generator/api-generator.js +++ b/api-generator/api-generator.js @@ -13,7 +13,8 @@ const staticMessages = { interfaces: 'Defines the custom interfaces used by the module.', types: 'Defines the custom types used by the module.', props: 'Defines the input properties of the component.', - service: 'Defines the service used by the component' + service: 'Defines the service used by the component.', + enums: 'Defines enums used by the component or service.' }; async function main() { @@ -101,6 +102,9 @@ async function main() { const module_types_group = module.groups.find( (g) => g.title === 'Types' ); + const module_enums_group = module.groups.find( + (g) => g.title === 'Enums' + ); // Todo: Add support for type aliases if (isProcessable(module_components_group)) { @@ -495,6 +499,39 @@ async function main() { doc[name]['types'] = types; } } + + if (isProcessable(module_enums_group)) { + const enums = { + description: staticMessages['enums'], + values: [] + }; + + module_enums_group.children.forEach((e) => { + enums.values.push({ + name: e.name, + description: + e.comment.summary && + e.comment.summary.map((s) => s.text || '').join(' '), + values: e.children.map(value => ({ name: value.escapedName, value: value.type.value })) + }); + typesMap[e.name] = e.comment.blockTags?.find( + tag => tag.tag === "@customPath" + )?.content?.map((s) => s.text || '').join(' ') + ?? name.replace("cps-", ""); + }); + + if (doc[name]?.enums) { + doc[name]['enums'] = { + ...doc[name]['enums'], + values: [ + ...doc[name]['enums'].values, + ...enums.values + ] + }; + } else { + doc[name]['enums'] = enums; + } + } } } }); From 3a12fa42605567612fb6026cbe27c9bea82dbef1 Mon Sep 17 00:00:00 2001 From: Lukas Matta Date: Thu, 28 Mar 2024 15:31:56 +0100 Subject: [PATCH 3/9] Regenerate docs --- .../src/app/api-data/cps-notification.json | 61 +++++++++++++ .../src/app/api-data/cps-table.json | 91 +++++++++++++++++++ .../src/app/api-data/types_map.json | 5 +- 3 files changed, 156 insertions(+), 1 deletion(-) diff --git a/projects/composition/src/app/api-data/cps-notification.json b/projects/composition/src/app/api-data/cps-notification.json index e4f487cd..93baf712 100644 --- a/projects/composition/src/app/api-data/cps-notification.json +++ b/projects/composition/src/app/api-data/cps-notification.json @@ -153,5 +153,66 @@ ] } ] + }, + "enums": { + "description": "Defines enums used by the component or service.", + "values": [ + { + "name": "CpsNotificationAppearance", + "description": "An enumeration of appearances of notifications.", + "values": [ + { + "name": "FILLED", + "value": "filled" + }, + { + "name": "OUTLINED", + "value": "outlined" + } + ] + }, + { + "name": "CpsNotificationPosition", + "description": "An enumeration of positions of notifications.", + "values": [ + { + "name": "CENTER", + "value": "center" + }, + { + "name": "TOP", + "value": "top" + }, + { + "name": "BOTTOM", + "value": "bottom" + }, + { + "name": "LEFT", + "value": "left" + }, + { + "name": "RIGHT", + "value": "right" + }, + { + "name": "TOPLEFT", + "value": "top-left" + }, + { + "name": "TOPRIGHT", + "value": "top-right" + }, + { + "name": "BOTTOMLEFT", + "value": "bottom-left" + }, + { + "name": "BOTTOMRIGHT", + "value": "bottom-right" + } + ] + } + ] } } \ No newline at end of file diff --git a/projects/composition/src/app/api-data/cps-table.json b/projects/composition/src/app/api-data/cps-table.json index f33b41b8..b2645850 100644 --- a/projects/composition/src/app/api-data/cps-table.json +++ b/projects/composition/src/app/api-data/cps-table.json @@ -710,5 +710,96 @@ "description": "CpsTableSortMode is used to define the sorting mode of the table." } ] + }, + "enums": { + "description": "Defines enums used by the component or service.", + "values": [ + { + "name": "CpsColumnFilterMatchMode", + "description": "CpsColumnFilterMatchMode is used to define how the filter value should be matched.", + "values": [ + { + "name": "STARTS_WITH", + "value": "startsWith" + }, + { + "name": "CONTAINS", + "value": "contains" + }, + { + "name": "NOT_CONTAINS", + "value": "notContains" + }, + { + "name": "ENDS_WITH", + "value": "endsWith" + }, + { + "name": "EQUALS", + "value": "equals" + }, + { + "name": "NOT_EQUALS", + "value": "notEquals" + }, + { + "name": "IN", + "value": "in" + }, + { + "name": "LESS_THAN", + "value": "lt" + }, + { + "name": "LESS_THAN_OR_EQUAL_TO", + "value": "lte" + }, + { + "name": "GREATER_THAN", + "value": "gt" + }, + { + "name": "GREATER_THAN_OR_EQUAL_TO", + "value": "gte" + }, + { + "name": "BETWEEN", + "value": "between" + }, + { + "name": "IS", + "value": "is" + }, + { + "name": "IS_NOT", + "value": "isNot" + }, + { + "name": "BEFORE", + "value": "before" + }, + { + "name": "AFTER", + "value": "after" + }, + { + "name": "DATE_IS", + "value": "dateIs" + }, + { + "name": "DATE_IS_NOT", + "value": "dateIsNot" + }, + { + "name": "DATE_BEFORE", + "value": "dateBefore" + }, + { + "name": "DATE_AFTER", + "value": "dateAfter" + } + ] + } + ] } } \ No newline at end of file diff --git a/projects/composition/src/app/api-data/types_map.json b/projects/composition/src/app/api-data/types_map.json index 5a44e332..dc1ed751 100644 --- a/projects/composition/src/app/api-data/types_map.json +++ b/projects/composition/src/app/api-data/types_map.json @@ -15,6 +15,7 @@ "CpsTabsAlignmentType": "tab-group", "CpsColumnFilterCategoryOption": "table", "CpsColumnFilterType": "table", + "CpsColumnFilterMatchMode": "table", "CpsTableExportFormat": "table", "CpsTableSize": "table", "CpsTableToolbarSize": "table", @@ -27,5 +28,7 @@ "CpsTreeTableSortMode": "tree-table", "CpsTooltipPosition": "tooltip", "CpsTooltipOpenOn": "tooltip", - "CpsNotificationConfig": "notification" + "CpsNotificationConfig": "notification", + "CpsNotificationAppearance": "notification", + "CpsNotificationPosition": "notification" } \ No newline at end of file From 3ae68ad6cb9c165bd5dc7d8555ca5d545f209415 Mon Sep 17 00:00:00 2001 From: Lukas Matta Date: Thu, 28 Mar 2024 15:33:05 +0100 Subject: [PATCH 4/9] Move common styles to styles.scss --- .../component-docs-viewer.component.scss | 71 ----------------- .../service-docs-viewer.component.scss | 77 ++----------------- projects/composition/src/styles.scss | 66 ++++++++++++++++ 3 files changed, 72 insertions(+), 142 deletions(-) diff --git a/projects/composition/src/app/components/component-docs-viewer/component-docs-viewer.component.scss b/projects/composition/src/app/components/component-docs-viewer/component-docs-viewer.component.scss index 670f1258..e69de29b 100644 --- a/projects/composition/src/app/components/component-docs-viewer/component-docs-viewer.component.scss +++ b/projects/composition/src/app/components/component-docs-viewer/component-docs-viewer.component.scss @@ -1,71 +0,0 @@ -:host { - .data-table { - width: 100%; - border-collapse: collapse; - - th { - font-weight: bold; - text-align: left; - padding: 0.75rem 1rem; - border-bottom: 1px solid var(--cps-color-line-light); - } - - tr { - transition: background-color 0.5s ease-in; - } - - td { - padding: 0.75rem 1rem; - border-bottom: 1px solid var(--cps-color-line-light); - white-space: pre-line; - - span { - display: flex; - max-width: min-content; - white-space: pre-line; - } - - &.highlighted-bg { - span { - color: var(--cps-color-depth-darken4); - background-color: var(--cps-color-human-lighten5); - border-radius: 6px; - padding: 0.2rem 0.5rem; - } - } - - &.highlighted-text { - color: var(--cps-color-calm); - - a { - color: var(--cps-color-calm); - - &:hover { - text-decoration: none; - } - } - } - - &.value-style { - span { - padding: 0.25rem; - border-radius: 6px; - font-family: - ui-monospace, - SFMono-Regular, - SF Mono, - Menlo, - Consolas, - Liberation Mono, - monospace; - background-color: var(--cps-color-bg-mid); - border: 1px solid var(--cps-color-line-light); - } - } - } - } - - .interface { - transition: background-color 0.5s ease-in; - } -} diff --git a/projects/composition/src/app/components/service-docs-viewer/service-docs-viewer.component.scss b/projects/composition/src/app/components/service-docs-viewer/service-docs-viewer.component.scss index 662f5955..eeac2f8c 100644 --- a/projects/composition/src/app/components/service-docs-viewer/service-docs-viewer.component.scss +++ b/projects/composition/src/app/components/service-docs-viewer/service-docs-viewer.component.scss @@ -1,74 +1,9 @@ -// Todo: think about using shared style for this component and the component-docs-viewer to reduce code repetition -.data-table { - width: 100%; - border-collapse: collapse; +.parameters { + display: flex; + flex-direction: column; + gap: 5px; - th { - font-weight: bold; - text-align: left; - padding: 0.75rem 1rem; - border-bottom: 1px solid var(--cps-color-line-light); + strong { + cursor: pointer; } - - tr { - transition: background-color 0.5s ease-in; - } - - td { - padding: 0.75rem 1rem; - border-bottom: 1px solid var(--cps-color-line-light); - white-space: pre-line; - - &.highlighted-bg { - span { - color: var(--cps-color-depth-darken4); - background-color: var(--cps-color-human-lighten5); - border-radius: 6px; - padding: 0.2rem 0.5rem; - } - } - - &.highlighted-text { - color: var(--cps-color-calm); - - a { - color: var(--cps-color-calm); - - &:hover { - text-decoration: none; - } - } - } - - &.value-style { - span { - padding: 0.25rem; - border-radius: 6px; - font-family: - ui-monospace, - SFMono-Regular, - SF Mono, - Menlo, - Consolas, - Liberation Mono, - monospace; - background-color: var(--cps-color-bg-mid); - border: 1px solid var(--cps-color-line-light); - } - } - - .parameters { - display: flex; - flex-direction: column; - gap: 5px; - - strong { - cursor: pointer; - } - } - } -} - -.interface { - transition: background-color 0.5s ease-in; } diff --git a/projects/composition/src/styles.scss b/projects/composition/src/styles.scss index bec6b00a..ddc9fd2a 100644 --- a/projects/composition/src/styles.scss +++ b/projects/composition/src/styles.scss @@ -32,3 +32,69 @@ body { .anchor-highlight { background-color: var(--cps-color-energy-lighten5); } + +.data-table { + width: 100%; + border-collapse: collapse; + + th { + font-weight: bold; + text-align: left; + padding: 0.75rem 1rem; + border-bottom: 1px solid var(--cps-color-line-light); + } + + tr { + transition: background-color 0.5s ease-in; + } + + td { + padding: 0.75rem 1rem; + border-bottom: 1px solid var(--cps-color-line-light); + white-space: pre-line; + + &.highlighted-bg { + span { + color: var(--cps-color-depth-darken4); + background-color: var(--cps-color-human-lighten5); + border-radius: 6px; + padding: 0.2rem 0.5rem; + } + } + + &.highlighted-text { + color: var(--cps-color-calm); + + a { + color: var(--cps-color-calm); + + &:hover { + text-decoration: none; + } + } + } + + &.inlined-content { + span { + display: inline; + } + } + + &.value-style { + span { + padding: 0.25rem; + border-radius: 6px; + font-family: + ui-monospace, + SFMono-Regular, + SF Mono, + Menlo, + Consolas, + Liberation Mono, + monospace; + background-color: var(--cps-color-bg-mid); + border: 1px solid var(--cps-color-line-light); + } + } + } +} From 7aa35450db787b8c045c9052bd6f66110ca218d3 Mon Sep 17 00:00:00 2001 From: Lukas Matta Date: Thu, 28 Mar 2024 15:33:31 +0100 Subject: [PATCH 5/9] Add model for enums --- .../src/app/models/component-api.model.ts | 15 ++++++++++++++- .../src/app/models/service-api.model.ts | 3 ++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/projects/composition/src/app/models/component-api.model.ts b/projects/composition/src/app/models/component-api.model.ts index 807f4574..a2925f2c 100644 --- a/projects/composition/src/app/models/component-api.model.ts +++ b/projects/composition/src/app/models/component-api.model.ts @@ -9,7 +9,6 @@ export interface EmitAPI { export interface PropAPI { default?: string; - // TODO: investigate why there is no description for setters props description?: string; name: string; optional: boolean; @@ -47,3 +46,17 @@ export interface InterfaceAPI { props?: PropAPI[]; }[]; } + +interface EnumAPI { + name: string; + description: string; + values: { + name: string; + value: string | number; + }[]; +} + +export interface EnumsAPI { + description: string; + values: EnumAPI[]; +} diff --git a/projects/composition/src/app/models/service-api.model.ts b/projects/composition/src/app/models/service-api.model.ts index c8070e53..d3f4c350 100644 --- a/projects/composition/src/app/models/service-api.model.ts +++ b/projects/composition/src/app/models/service-api.model.ts @@ -1,4 +1,4 @@ -import { InterfaceAPI, TypesAPI } from './component-api.model'; +import { EnumsAPI, InterfaceAPI, TypesAPI } from './component-api.model'; export interface MethodAPI { name: string; @@ -20,4 +20,5 @@ export interface ServiceAPI { }; types?: TypesAPI; interfaces?: InterfaceAPI; + enums?: EnumsAPI; } From fb6fb6347f85cc645c582f96da02c152f5ac2807 Mon Sep 17 00:00:00 2001 From: Lukas Matta Date: Thu, 28 Mar 2024 15:36:17 +0100 Subject: [PATCH 6/9] Add component for viewing enums --- .../shared/enums/enum-values.pipe.ts | 17 ++++++++++ .../shared/enums/enums.component.html | 32 +++++++++++++++++++ .../shared/enums/enums.component.scss | 0 .../shared/enums/enums.component.ts | 15 +++++++++ 4 files changed, 64 insertions(+) create mode 100644 projects/composition/src/app/components/shared/enums/enum-values.pipe.ts create mode 100644 projects/composition/src/app/components/shared/enums/enums.component.html create mode 100644 projects/composition/src/app/components/shared/enums/enums.component.scss create mode 100644 projects/composition/src/app/components/shared/enums/enums.component.ts diff --git a/projects/composition/src/app/components/shared/enums/enum-values.pipe.ts b/projects/composition/src/app/components/shared/enums/enum-values.pipe.ts new file mode 100644 index 00000000..f764b983 --- /dev/null +++ b/projects/composition/src/app/components/shared/enums/enum-values.pipe.ts @@ -0,0 +1,17 @@ +import { Pipe, PipeTransform } from '@angular/core'; + +@Pipe({ + name: 'enumValues', + standalone: true +}) +export class EnumValuesPipe implements PipeTransform { + transform( + values: { name: string; value: string | number }[] + ): { name: string; value: string | number }[] { + // Wraps value in "" in case it is a string + return values.map((value) => ({ + ...value, + value: typeof value.value === 'string' ? `"${value.value}"` : value.value + })); + } +} diff --git a/projects/composition/src/app/components/shared/enums/enums.component.html b/projects/composition/src/app/components/shared/enums/enums.component.html new file mode 100644 index 00000000..abee651a --- /dev/null +++ b/projects/composition/src/app/components/shared/enums/enums.component.html @@ -0,0 +1,32 @@ +@if (enums && enums.values && enums.values.length > 0) { +
+

Enums

+

{{ enums.description }}

+
+ + + + + + + + @for (enum of enums.values; track enum.name) { + + + + + + } + +
NameValuesDescription
+ {{ enum.name }} + + @for (value of enum.values | enumValues; track $index) { +
+ {{ value.name }}: {{ value.value }} +
+ } +
{{ enum.description }}
+
+
+} diff --git a/projects/composition/src/app/components/shared/enums/enums.component.scss b/projects/composition/src/app/components/shared/enums/enums.component.scss new file mode 100644 index 00000000..e69de29b diff --git a/projects/composition/src/app/components/shared/enums/enums.component.ts b/projects/composition/src/app/components/shared/enums/enums.component.ts new file mode 100644 index 00000000..06806bd7 --- /dev/null +++ b/projects/composition/src/app/components/shared/enums/enums.component.ts @@ -0,0 +1,15 @@ +import { Component, Input } from '@angular/core'; +import { EnumsAPI } from '../../../models/component-api.model'; +import { EnumValuesPipe } from './enum-values.pipe'; +import { CpsTooltipDirective } from 'cps-ui-kit'; + +@Component({ + selector: 'app-enums', + templateUrl: './enums.component.html', + styleUrl: './enums.component.scss', + imports: [EnumValuesPipe, CpsTooltipDirective], + standalone: true +}) +export class EnumsComponent { + @Input() enums?: EnumsAPI; +} From 96e358b8a69ae2a34c73473b9d8380bb2cebdddf Mon Sep 17 00:00:00 2001 From: Lukas Matta Date: Thu, 28 Mar 2024 15:38:07 +0100 Subject: [PATCH 7/9] Add enums --- .../component-docs-viewer.component.html | 4 +++- .../component-docs-viewer.component.ts | 6 +++++- .../service-docs-viewer/service-docs-viewer.component.html | 4 +++- .../service-docs-viewer/service-docs-viewer.component.ts | 4 +++- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/projects/composition/src/app/components/component-docs-viewer/component-docs-viewer.component.html b/projects/composition/src/app/components/component-docs-viewer/component-docs-viewer.component.html index 0f41313a..76962967 100644 --- a/projects/composition/src/app/components/component-docs-viewer/component-docs-viewer.component.html +++ b/projects/composition/src/app/components/component-docs-viewer/component-docs-viewer.component.html @@ -145,7 +145,7 @@

Interfaces

interface of componentData.interfaces.values; track interface.name ) { -
+

{{ interface.name }}

{{ interface.description }}

@@ -180,6 +180,8 @@

{{ interface.name }}

} + + diff --git a/projects/composition/src/app/components/component-docs-viewer/component-docs-viewer.component.ts b/projects/composition/src/app/components/component-docs-viewer/component-docs-viewer.component.ts index 45c8b612..8cb2358e 100644 --- a/projects/composition/src/app/components/component-docs-viewer/component-docs-viewer.component.ts +++ b/projects/composition/src/app/components/component-docs-viewer/component-docs-viewer.component.ts @@ -2,6 +2,7 @@ import { CommonModule } from '@angular/common'; import { Component, Input } from '@angular/core'; import { ComponentAPI, + EnumsAPI, InterfaceAPI, TypesAPI } from '../../models/component-api.model'; @@ -12,6 +13,7 @@ import TypesMap from '../../api-data/types_map.json'; import { RouterModule } from '@angular/router'; import { ViewerComponent } from '../viewer/viewer.component'; import { DetectTypePipe } from '../../pipes/detect-type.pipe'; +import { EnumsComponent } from '../shared/enums/enums.component'; @Component({ selector: 'app-component-docs-viewer', @@ -23,7 +25,8 @@ import { DetectTypePipe } from '../../pipes/detect-type.pipe'; CpsTabGroupComponent, ObjectEntriesPipe, RouterModule, - DetectTypePipe + DetectTypePipe, + EnumsComponent ], standalone: true }) @@ -32,6 +35,7 @@ export class ComponentDocsViewerComponent extends ViewerComponent { components: { [key: string]: ComponentAPI }; types?: TypesAPI; interfaces?: InterfaceAPI; + enums?: EnumsAPI; }; TypesMap: Record = TypesMap; diff --git a/projects/composition/src/app/components/service-docs-viewer/service-docs-viewer.component.html b/projects/composition/src/app/components/service-docs-viewer/service-docs-viewer.component.html index d9f9225a..26470e91 100644 --- a/projects/composition/src/app/components/service-docs-viewer/service-docs-viewer.component.html +++ b/projects/composition/src/app/components/service-docs-viewer/service-docs-viewer.component.html @@ -122,7 +122,7 @@

Interfaces

interface of serviceData.interfaces.values; track interface.name ) { -
+

{{ interface.name }}

{{ interface.description }}

@@ -157,6 +157,8 @@

{{ interface.name }}

} + + diff --git a/projects/composition/src/app/components/service-docs-viewer/service-docs-viewer.component.ts b/projects/composition/src/app/components/service-docs-viewer/service-docs-viewer.component.ts index 3d040026..cf4b4219 100644 --- a/projects/composition/src/app/components/service-docs-viewer/service-docs-viewer.component.ts +++ b/projects/composition/src/app/components/service-docs-viewer/service-docs-viewer.component.ts @@ -10,6 +10,7 @@ import { ViewerComponent } from '../viewer/viewer.component'; import TypesMap from '../../api-data/types_map.json'; import { RouterLink } from '@angular/router'; import { DetectTypePipe } from '../../pipes/detect-type.pipe'; +import { EnumsComponent } from '../shared/enums/enums.component'; @Component({ selector: 'app-service-docs-viewer', @@ -22,7 +23,8 @@ import { DetectTypePipe } from '../../pipes/detect-type.pipe'; CpsTabGroupComponent, RouterLink, DetectTypePipe, - CpsTooltipDirective + CpsTooltipDirective, + EnumsComponent ] }) export class ServiceDocsViewerComponent extends ViewerComponent { From 9f3569d5ac05a6129f09282fa6ba681bc9d208e2 Mon Sep 17 00:00:00 2001 From: Lukas Matta Date: Thu, 28 Mar 2024 15:38:16 +0100 Subject: [PATCH 8/9] Remove unused style --- projects/composition/src/styles.scss | 6 ------ 1 file changed, 6 deletions(-) diff --git a/projects/composition/src/styles.scss b/projects/composition/src/styles.scss index ddc9fd2a..0db3cd70 100644 --- a/projects/composition/src/styles.scss +++ b/projects/composition/src/styles.scss @@ -74,12 +74,6 @@ body { } } - &.inlined-content { - span { - display: inline; - } - } - &.value-style { span { padding: 0.25rem; From 9bd8d18ca5382a5f06ac9810d7bb7ae62c898989 Mon Sep 17 00:00:00 2001 From: Lukas Matta Date: Thu, 28 Mar 2024 15:51:23 +0100 Subject: [PATCH 9/9] Fix spacing --- .../service-docs-viewer/service-docs-viewer.component.scss | 1 + projects/composition/src/styles.scss | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/projects/composition/src/app/components/service-docs-viewer/service-docs-viewer.component.scss b/projects/composition/src/app/components/service-docs-viewer/service-docs-viewer.component.scss index eeac2f8c..6f0af86c 100644 --- a/projects/composition/src/app/components/service-docs-viewer/service-docs-viewer.component.scss +++ b/projects/composition/src/app/components/service-docs-viewer/service-docs-viewer.component.scss @@ -5,5 +5,6 @@ strong { cursor: pointer; + margin-right: 2px; } } diff --git a/projects/composition/src/styles.scss b/projects/composition/src/styles.scss index 0db3cd70..7a82c228 100644 --- a/projects/composition/src/styles.scss +++ b/projects/composition/src/styles.scss @@ -53,6 +53,12 @@ body { border-bottom: 1px solid var(--cps-color-line-light); white-space: pre-line; + span { + display: flex; + max-width: min-content; + white-space: pre-line; + } + &.highlighted-bg { span { color: var(--cps-color-depth-darken4);