Skip to content
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

[documentation]: documentation feedback #7284

Closed
nnaydenow opened this issue Jun 30, 2023 · 6 comments
Closed

[documentation]: documentation feedback #7284

nnaydenow opened this issue Jun 30, 2023 · 6 comments

Comments

@nnaydenow
Copy link
Contributor

nnaydenow commented Jun 30, 2023

Enums in JSDoc (component issue) (storybook issue)

Note: API dropdown is not shown for subcomponents (f.e. ui5-option, ui5-table-row, etc.) As for now, do not remove the jsdocs for them.

Properties that are using enum as a type have enum values as a list inside jsdoc comment that describes the property (Avatar's colorScheme property). Storybook provides a way to display the enum values natively and also a select dropdown where you can choose the value that has to be used.

image

Expected solution:
Remove the enum values from the jsdoc comments

Note - as some enums are missing from the dropdown a central solution is also needed for components that use enums from other packages.

image

Story names (component issue)

A lot of the components' stories have very long name that wraps and makes the side navigation to look not that good.

Expected solution:
Rename the stories with shorter names

image

A lot of simple stories (component issue)

A lot of the components' stories illustrate very little features and most of the stories seems to be redudant.

For example:
Switch component has 5 simple stories and every different story illustrates a simple property. These behaviors could be easily achieved by playing with the basic dynamic sample (one of the biggest features of the storybook)

image

Possible solution:
Group the samples and combine them.

Revise story names (component issue)

Some of the component stories have not descriptive names and a lot of repetition like:
image

Possible solution:
Revise the name and remove the repetition

Basic stories (component issue)

Most of the components provide a basic story and others not.

Possible solution:
Add basic story for every component.

Component name appears in CamelCase (component issue)

Components names looks bad in CamelCase without spaces.

Possible solution:
Find a way component name to be displayed with spaces: FlexibleColumnLayout => Flexible Column layout

Missing attributes (storybook issue)

In API table only properties appear and respectively attribute is missed (accessibleNameRef f.e.). That should be handled generally.

Logo navlink (storybook issue)

Clicking on the logo should navigation to landing page, but it navigates to https://sap.github.io/ui5-webcomponents/playground/?path=/docs/docs-getting-started-first-steps--docs

API Table wrong tab name (storybook issue) #7436

Some tab names inside API table are visualised wrong by adding Ui5 prefix before the tab name https://sap.github.io/ui5-webcomponents/playground/?path=/docs/main-select--docs
image

String properties (TBD - as of now - storybook issue)

Some string properties are written inside quotes and if you write value without "" it appears as a wrong value.
https://sap.github.io/ui5-webcomponents/nightly/playground/?path=/story/main-colorpicker--basic - for color property

HTML add-on. (storybook issue)

It doesn't visualize the decorators.
Example here:
https://sap.github.io/ui5-webcomponents/playground/?path=/story/main-dialog--bar-in-dialog
In the separate example the styles are not visible. They should look like this (screenshot from "docs" section):

Components/Samples issue

Styles in api.css file.

This file is created for the old Playground, but is is not deleted yet the styles in it are applied to the new Story book samples.
The best approach is to move the corresponding styles to every Story book sample file. This way they will be visible to the users.

Card with table

  1. Open https://sap.github.io/ui5-webcomponents/playground/?path=/docs/main-card--docs#with-table
  2. Look the table inside the card
image
@ilhan007 ilhan007 added documentation This issue is about wrong documentation Storybook labels Jun 30, 2023
@ivoplashkov ivoplashkov self-assigned this Jul 3, 2023
@ivoplashkov
Copy link
Member

Hello collegues,

@nnaydenow has provided some well described feedback and issues related to the Storybook, which require your attention.
Could you please check?

Thank you in advance!
Best regards,
Ivaylo

@ivoplashkov ivoplashkov removed their assignment Jul 3, 2023
@nnaydenow
Copy link
Contributor Author

Hi @ivoplashkov,

It's this is cross team issue and it has to be addressed by every team separately since Topic P are responsible only for the story book and their stories.

@LidiyaGeorgieva
Copy link
Contributor

Hello,

I noticed a problem in the HTML add-on. It doesn't visualize the decorators.
Example here:
https://sap.github.io/ui5-webcomponents/playground/?path=/story/main-dialog--bar-in-dialog
In the separate example the styles are not visible. They should look like this (screenshot from "docs" section):
image

Best Regards,
Lidiya

@LidiyaGeorgieva
Copy link
Contributor

LidiyaGeorgieva commented Jul 31, 2023

@SAP/ui5-webcomponents-topic-p, @SAP/ui5-webcomponents-topic-rl, @SAP/ui5-webcomponents-topic-b,
please check also if there are styles for your Story book samples in this file: packages/playground/assets/css/api.css.
This file is created for the old Playground, but is is not deleted yet the styles in it are applied to the new Story book samples.
The best approach is to move the corresponding styles to every Story book sample file. This way they will be visible to the users.

@niyap
Copy link
Contributor

niyap commented Aug 17, 2023

Hello @ui5-webcomponents-topic-p,

I found out something two things while revising the samples.

  1. In many of the samples that have DOM operations included (e.g const dialogOpener = document.getElementById("openDialogButton"); -> IllustratedMessage.stories.ts) when you access the sample for the first time it works as expected, then if you navigate to another one and then go back to the affected one, trying to do the same action, a console error is thrown that the identifier is already declared.
Screenshot 2023-08-17 at 9 18 34

(reproducible in all samples with such behaviour)

  1. When we have a property with value of type sap.ui.webc.base.types.Float or sap.ui.webc.base.types.Integer in storybook it is visualised in the following way when trying to manipulate it.
Screenshot 2023-08-17 at 9 21 34 Screenshot 2023-08-17 at 9 21 55 Screenshot 2023-08-17 at 9 22 13 It looks a little bit strange for me.

yanaminkova added a commit that referenced this issue Sep 27, 2023
yanaminkova added a commit that referenced this issue Oct 16, 2023
Related: #7284

The enum values are removed from the jsdoc comments
yanaminkova added a commit that referenced this issue Oct 16, 2023
Related: #7284

The stories, which do not provide enough features or illustrate only property functionality are grouped and combined into one story.
Basic story is added for the components, which do not have such.
kineticjs added a commit to kineticjs/ui5-webcomponents that referenced this issue Oct 30, 2023
kineticjs added a commit to kineticjs/ui5-webcomponents that referenced this issue Oct 31, 2023
Related to: SAP#7284

Problem:
Some components have properties of custom types that extend
sap.ui.webc.base.types.DataType. Storybook allows editing
the values of those properies in the Controls addon, but by
default storybook allows to edit them via controls of type
object. However, in most cases, the more suitable control for
editing those values would be of type text or number.

Solution:
Further customized the story settings to specify the expected
control type. To handle the issue globally, added that logic to
the existing script that sets control types based on property type.
kineticjs added a commit that referenced this issue Nov 13, 2023
* docs(playground): enhance editing of custom typeproperties

Related to: #7284

Problem:
Some components have properties of custom types that extend
sap.ui.webc.base.types.DataType. Storybook allows editing
the values of those properies in the Controls addon, but by
default storybook allows to edit them via controls of type
object. However, in most cases, the more suitable control for
editing those values would be of type text or number.

Solution:
Further customized the story settings to specify the expected
control type. To handle the issue globally, added that logic to
the existing script that sets control types based on property type.

* docs(playground): utilize native Array.prototype.includes function
@DMihaylova
Copy link

All the teams have completed their tasks. Therefore I'm closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Completed
Status: Completed
Status: Completed
Status: Completed
Development

No branches or pull requests

7 participants