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

Update API reference descriptions for consistency across components #7071

Closed
geospatialem opened this issue May 31, 2023 · 12 comments
Closed
Assignees
Labels
4 - verified Issues that have been released and confirmed resolved. docs Issues relating to documentation updates only. estimate - 8 Requires input from team, consider smaller steps. p - medium Issue is non core or affecting less that 60% of people using the library

Comments

@geospatialem
Copy link
Member

geospatialem commented May 31, 2023

Description

Comb through all components and update all API ref descriptions to fit our style guide from #4442, which include:

  • Use complete sentences with proper grammar, capitalization, and punctuation.
  • No abbreviations, e.g. use "property" instead of "prop".
  • Verbs must be in present tense (e.g., "emits" instead of "emitted").
  • When referring to the component that the property/slot/method/css variable belongs to, call it "the component".
  • Use the full tag name when referencing other Calcite Components (prefix with calcite-), e.g. calcite-button instead of button.
  • For plural context, use calcite-buttons instead of calcite-button elements.
  • Use backticks (`) for the names of slots, events, properties, CSS variables, and component names.
  • Use double quotes (") for the values of properties/attributes and event details.
  • Only use single quotes (') as apostrophes.
  • No links or URLs allowed in descriptions. If a link is necessary, a custom JSDoc tag should be added and parsed in the SDK site.
  • Refrain from using "e.g." or "i.e." references. Leverage "such as" (or similar) where examples are referenced.
  • Use "Accessible" instead of "Aria" language
  • Verify slots don't use the text "optional" in their descriptions
  • Remove optional JSDoc tags for props (?)

Original Issue Description

Our property/slot/method descriptions are all over the place right now. We need to decide on some conventions, and then audit and proofread to make sure they are consistent. Some things to consider:

  • Should they be sentences with proper case/punctuation/grammar, or should they be more like bullet points?
  • Which verb tense should we use?
  • Which quotation marks should be used (single vs double vs tick) in the descriptions? Should different quotation marks be used for different purposes (calcite-xyz vs "value")? e.g. disableCloseOnSelect uses double and overlayPositioning uses single
  • How should components be named when mentioned in the description? Should they be the full tag name? Should they be in quotes? - here here here here
  • Should links be allowed in the description? If so, how should they be formatted? e.g. indeterminate, download, value

In addition to the consistency conventions, there is a lot of clean up that needs to happen. For example,

  • The description does not need to mention the default, since it is specified in the table - here
    • This also applies to documentation that is linked out, and contains many properties.
  • The description does not need to specify that it is read-only, since it displays a chip based on a jsdoc tag here
  • Product names should be capitalized, e.g. "Calcite UI Icons" vs this

This is not an exhaustive list, but it is a start. If anyone else has something to add please feel free. @geospatialem and I will decide on and document the conventions, and then start updating the jsdoc.

Which Component

All components

Progress checklist
  • accordion - Ditwan and Kitty
  • accordion-item - Ditwan and Kitty
  • action - Ditwan and Kitty
  • action-bar - Ditwan and Kitty
  • action-group - Ditwan and Kitty
  • action-menu - Ditwan and Kitty
  • action-pad - Kitty
  • alert - Kitty
  • avatar - Kitty
  • block - Ditwan
  • block-section - Ditwan
  • button - Ditwan
  • card - Ditwan
  • checkbox - Ditwan
  • chip - Ditwan
  • chip-group - Ditwan
  • color-picker - Ditwan
  • combobox - Ditwan
  • combobox-item - Ditwan
  • combobox-item-group - Ditwan
  • date-picker - Ditwan
  • date-picker-day - Ditwan
  • date-picker-month - Ditwan
  • date-picker-month-header - Ditwan
  • dropdown - Ditwan
  • dropdown-group - Ditwan
  • dropdown-item - Ditwan
  • fab - Ditwan
  • filter - Ditwan
  • flow - Ditwan
  • flow-item - Ditwan
  • graph - Ditwan
  • handle - Ditwan
  • icon - Ditwan
  • inline-editable - Ditwan
  • input - Ditwan
  • input-date-picker - Ditwan
  • input-message - Ditwan
  • input-text - Ditwan
  • input-time-picker - Ditwan
  • input-time-zone - Ditwan
  • label - Ditwan
  • link - Ditwan
  • list - Ditwan
  • list-item - Ditwan
  • list-item-group - Ditwan
  • loader - Ditwan
  • menu - Kitty
  • menu-item - Kitty
  • meter - Kitty
  • modal - Kitty
  • navigation - Kitty
  • navigation-logo - Kitty
  • navigation-user - Kitty
  • notice - Kitty
  • option - Kitty
  • option-group - Kitty
  • pagination - Kitty
  • panel - Kitty
  • pick-list - Kitty
  • pick-list-group - Kitty
  • pick-list-item - Kitty
  • popover - Kitty
  • progress - Kitty
  • radio-group - Kitty
  • radio-group-item - Kitty
  • rating - Kitty
  • scrim - Kitty
  • segmented-control - Kitty
  • segmented-control-item - Kitty
  • select - Kitty
  • sheet - Kitty
  • shell - Kitty
  • shell-center-row - Kitty
  • shell-panel - Kitty
  • slider - Kitty
  • split-button - Kitty
  • stepper - Kitty
  • stepper-item - Kitty
  • switch - Kitty
  • tab - Kitty
  • tab-nav - Kitty
  • tab-title - Kitty
  • tabs - Kitty
  • table - Kitty
  • table-header - Kitty
  • table-row - Kitty
  • table-cell - Kitty
  • text-area - Kitty
  • tile - Kitty
  • tile-select - Kitty
  • tile-select-group - Kitty
  • time-picker - Kitty
  • tip - Kitty
  • tip-group - Kitty
  • tip-manager - Kitty
  • tooltip - Kitty
  • tree - Kitty
  • tree-item - Kitty
  • value-list - Kitty
  • value-list-item - Kitty

Verified checklist

  • accordion - Kitty
  • accordion-item - Kitty
  • action - Kitty
  • action-bar - Kitty
  • action-group - Kitty
  • action-menu - Kitty
  • action-pad - Kitty
  • alert - Kitty
  • avatar - Kitty
  • block - Kitty
  • block-section - Kitty
  • button - Kitty
  • card - Kitty
  • checkbox - Kitty
  • chip - Kitty
  • chip-group - Kitty
  • color-picker - Kitty
  • combobox - Kitty
  • combobox-item - Kitty
  • combobox-item-group - Kitty
  • date-picker - Kitty
  • dropdown - Kitty
  • dropdown-group - Kitty
  • dropdown-item - Kitty
  • fab - Kitty
  • filter - Kitty
  • flow - Kitty
  • flow-item - Kitty
  • icon - Kitty
  • inline-editable - Kitty
  • input - Kitty
  • input-date-picker - Kitty
  • input-message - Kitty
  • input-text - Kitty
  • input-number - Kitty
  • input-time-picker - Kitty
  • input-time-zone - Kitty
  • label - Kitty
  • link - Kitty
  • list - Kitty
  • list-item - Kitty
  • list-item-group - Kitty
  • loader - Kitty
  • menu - Ditwan
  • menu-item - Ditwan
  • meter - Ditwan
  • modal - Ditwan
  • navigation - Ditwan
  • navigation-logo - Ditwan
  • navigation-user - Ditwan
  • notice - Ditwan
  • option - Ditwan
  • option-group - Ditwan
  • pagination - Ditwan
  • panel - Ditwan
  • pick-list - Ditwan
  • pick-list-group - Ditwan
  • pick-list-item - Ditwan
  • popover - Ditwan
  • progress - Ditwan
  • radio-group - Ditwan
  • radio-group-item - Ditwan
  • rating - Ditwan
  • scrim - Ditwan
  • segmented-control - Ditwan
  • segmented-control-item - Ditwan
  • select - Ditwan
  • sheet - Ditwan
  • shell - Ditwan
  • shell-center-row - Ditwan
  • shell-panel - Ditwan
  • slider - Ditwan
  • split-button - Ditwan
  • stepper - Ditwan
  • stepper-item - Ditwan
  • switch - Ditwan
  • tab - Ditwan
  • tab-nav - Ditwan
  • tab-title - Ditwan
  • tabs - Ditwan
  • table - Ditwan
  • table-header - Ditwan
  • table-row - Ditwan
  • table-cell - Ditwan
  • text-area - Ditwan
  • tile - Ditwan
  • tile-select - Ditwan
  • tile-select-group - Ditwan
  • time-picker - Ditwan
  • tip - Ditwan
  • tip-group - Ditwan
  • tip-manager - Ditwan
  • tooltip - Ditwan
  • tree - Ditwan
  • tree-item - Ditwan
  • value-list - Ditwan
  • value-list-item - Ditwan

Resources

No response

@geospatialem geospatialem added docs Issues relating to documentation updates only. 1 - assigned Issues that are assigned to a sprint and a team member. p - medium Issue is non core or affecting less that 60% of people using the library estimate - 8 Requires input from team, consider smaller steps. labels May 31, 2023
@geospatialem geospatialem added this to the 2023 August Priorities milestone May 31, 2023
@geospatialem geospatialem self-assigned this May 31, 2023
@geospatialem geospatialem added 2 - in development Issues that are actively being worked on. and removed 1 - assigned Issues that are assigned to a sprint and a team member. labels Jan 2, 2024
geospatialem added a commit that referenced this issue Jan 2, 2024
…ription refs (#8533)

**Related Issue:** #7071

## Summary
Updates doc consistency across a-named components defined in the above
issue for props, events, methods, and css vars, including:
- `action-bar`
- `action-group`
- `action-pad`
- `alert`

cc @DitwanP
benelan pushed a commit that referenced this issue Jan 2, 2024
…ription refs (#8533)

**Related Issue:** #7071

## Summary
Updates doc consistency across a-named components defined in the above
issue for props, events, methods, and css vars, including:
- `action-bar`
- `action-group`
- `action-pad`
- `alert`

cc @DitwanP
geospatialem added a commit that referenced this issue Jan 2, 2024
… api description refs (#8535)

**Related Issue:** #7071

## Summary
Updates doc consistency across t and v-named components defined in the
above issue for props, events, methods, and css vars, including:
- `tab-nav`
- `table`
- `tabs`
- `tile-select`
- `tree`
- `value-list`
DitwanP added a commit that referenced this issue Jan 3, 2024
**Related Issue:** #7071

## Summary
Updates doc consistency across b and c-named components defined in the
above issue for props, events, methods, and css vars, including:

- `button`
- `block`
- `block-section`
- `color-picker-hex-input`
- `color-picker`
- `combobox`

cc @geospatialem
DitwanP added a commit that referenced this issue Jan 3, 2024
…8540)

**Related Issue:** #7071 

## Summary
Updates doc consistency across b and c-named components defined in the
above issue for props, events, methods, and css vars, including:

- `date-picker-day`
- `date-picker-month`
- `date-picker-month-header`
- `dropdown-group`
- `dropdown-item`
- `filter`
- `graph`
- `handle`

cc @geospatialem
geospatialem added a commit that referenced this issue Jan 5, 2024
**Related Issue:** #7071 

## Summary
Updates doc consistency across m through s-named components defined in
the above issue for props, events, methods, and css vars, including:
- `meter`
    - Also includes some inconsistencies in the prop names 
- `modal`
- `navigation-logo`
- `navigation-user`
- `navigation`
- `notice`
- `pick-list`
- `popover`
- `select`
- `sheet`
- `shell-panel`
- `slider`
- `split-button`
DitwanP added a commit that referenced this issue Jan 8, 2024
**Related Issue:** #7071

## Summary
Updates doc consistency across i and l-named components defined in the
above issue for props, events, methods, and css vars, including:

- `input-date-picker`
- `input-time-zone`
- `list-item-group`
- `list-item`
- `list`

cc @geospatialem
@DitwanP DitwanP added 3 - installed Issues that have been merged to master branch and are ready for final confirmation. and removed 2 - in development Issues that are actively being worked on. labels Jan 8, 2024
Copy link
Contributor

github-actions bot commented Jan 8, 2024

Installed and assigned for verification.

@geospatialem
Copy link
Member Author

geospatialem commented Jan 9, 2024

@DitwanP Found a few small additions we could make while verifying some components:

  • It looks like we could add in backticks to input-time-zone's referenceDate prop, WRT the Date, and backticks and double quotes to "YYYY-MM-DD" and "YYYY-MM-DDTHH:MM:SS.SSSZ".

* It can be either a Date instance or a string in ISO format (YYYY-MM-DD, YYYY-MM-DDTHH:MM:SS.SSSZ)

image

  • It looks like input-time-zone's events don't have doc yet, maybe we could add some context in for folks?

@Event({ cancelable: false }) calciteInputTimeZoneBeforeClose: EventEmitter<void>;
@Event({ cancelable: false }) calciteInputTimeZoneBeforeOpen: EventEmitter<void>;
@Event({ cancelable: false }) calciteInputTimeZoneChange: EventEmitter<void>;
@Event({ cancelable: false }) calciteInputTimeZoneClose: EventEmitter<void>;
@Event({ cancelable: false }) calciteInputTimeZoneOpen: EventEmitter<void>;

image

Were we also aiming to include other props with multiple selections as part of this effort? It looks like there may be a few remaining items, including:

  • combobox's selectionDisplay:

    * When `selectionMode` is `"ancestors"` or `"multiple"`, specifies the display of multiple `calcite-combobox-item` selections
    * - `"all"` (displays all selections with individual `calcite-chip`s), `"fit"` (displays individual `calcite-chip`s that scale to the component's size, including a non-closable `calcite-chip`, which provides the number of additional `calcite-combobox-item` selections not visually displayed), or `"single"` (display one `calcite-chip` with the total number of selections).
    */

  • shell-panel's displayMode:

    /**
    * Specifies the display mode - `"dock"` (full height, displays adjacent to center content), `"float"` (not full height, content is separated detached from `calcite-action-bar`, displays on top of center content),
    * or `"overlay"` (full height, displays on top of center content).
    */

@geospatialem geospatialem added 2 - in development Issues that are actively being worked on. and removed 3 - installed Issues that have been merged to master branch and are ready for final confirmation. labels Jan 9, 2024
@DitwanP
Copy link
Contributor

DitwanP commented Jan 9, 2024

Were we also aiming to include other props with multiple selections as part of this effort? It looks like there may be a few remaining items, including:

😱 I thought we got all the selectionMode props. Anything else that needed to be listed out in a similar fashion I was going to make a separate PR for those. At least that was the plan.

I'll get the PR in to address the things you mentioned here.

@geospatialem
Copy link
Member Author

😱 I thought we got all the selectionMode props. Anything else that needed to be listed out in a similar fashion I was going to make a separate PR for those. At least that was the plan.

Ah, gotcha. Do we want a separate issue to address those props, or we should work towards addressing them in this issue? I'm good with either approach.

@DitwanP
Copy link
Contributor

DitwanP commented Jan 9, 2024

😱 I thought we got all the selectionMode props. Anything else that needed to be listed out in a similar fashion I was going to make a separate PR for those. At least that was the plan.

Ah, gotcha. Do we want a separate issue to address those props, or we should work towards addressing them in this issue? I'm good with either approach.

I don't have a preference either, I'm fine with leaving this one open and getting a PR added in for those changes, that seems like the simplest route.

DitwanP added a commit that referenced this issue Jan 10, 2024
**Related Issue:** #7071

## Summary
Updates doc consistency across various components defined in the above
issue for props, events, methods, and css vars, including:

- `block-section`
- `checkbox`
- `chip`
- `combobox`
- `fab`
- `input-number`
- `input-time-zone`
- `radio-button`
- `segmented-control`
- `shell-panel`
- `switch`
- `text-area`
- `tile-select`
- `tree`

---------

Co-authored-by: Matt Driscoll <mdriscoll@esri.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@DitwanP DitwanP added 3 - installed Issues that have been merged to master branch and are ready for final confirmation. and removed 2 - in development Issues that are actively being worked on. labels Jan 10, 2024
Copy link
Contributor

Installed and assigned for verification.

@DitwanP
Copy link
Contributor

DitwanP commented Jan 10, 2024

The only thing of note that I came across when validating was this.

  • Do we want to remove these parenthesis from navigation-user and reword the sentence?
    image

@geospatialem
Copy link
Member Author

  • Do we want to remove these parenthesis from navigation-user and reword the sentence?

It's also part of avatar's thumbnail prop.

I think the parenthesis help differentiate the focus since its dependent on what the developer is implementing, but if we have a revision in mind - we could change it as well. WDYT?

/** Specifies the `src` to an image (remember to add a token if the user is private). */
@Prop({ reflect: true }) thumbnail: string;

@cris6097
Copy link

cris6097 commented Jan 11, 2024 via email

@cris6097
Copy link

cris6097 commented Jan 11, 2024 via email

@DitwanP
Copy link
Contributor

DitwanP commented Jan 11, 2024

I think the parenthesis help differentiate the focus since its dependent on what the developer is implementing, but if we have a revision in mind - we could change it as well. WDYT?

That makes sense, I think its fine to stay.

@DitwanP
Copy link
Contributor

DitwanP commented Jan 11, 2024

🍡 @geospatialem verified the top half of components, and I verified the bottom half.

@DitwanP DitwanP closed this as completed Jan 11, 2024
@DitwanP DitwanP added 4 - verified Issues that have been released and confirmed resolved. and removed 3 - installed Issues that have been merged to master branch and are ready for final confirmation. labels Jan 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4 - verified Issues that have been released and confirmed resolved. docs Issues relating to documentation updates only. estimate - 8 Requires input from team, consider smaller steps. p - medium Issue is non core or affecting less that 60% of people using the library
Projects
None yet
Development

No branches or pull requests

3 participants