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

website: Combine components #944

Merged
merged 18 commits into from
Jan 5, 2023
Merged

website: Combine components #944

merged 18 commits into from
Jan 5, 2023

Conversation

gretanausedaite
Copy link
Contributor

@gretanausedaite gretanausedaite commented Jan 3, 2023

Combined:

  • Select and LabeledSelect
  • TextArea and LabeledTextArea
  • Input and LabeledInput
  • ProgressRadial and ProgressLinear

@gretanausedaite gretanausedaite requested a review from a team as a code owner January 3, 2023 11:43
@gretanausedaite gretanausedaite requested review from a team, mayank99 and r100-stack and removed request for a team January 3, 2023 11:43
@gretanausedaite
Copy link
Contributor Author

Components that don't have unique thumbnail:

  • DropdownButton
  • IconButton
  • IdeasButton
  • SplitButton
  • Label

Create thumbnails or combine all buttons into one big buttons doc page?

@gretanausedaite gretanausedaite self-assigned this Jan 3, 2023
@gretanausedaite gretanausedaite linked an issue Jan 3, 2023 that may be closed by this pull request
@mayank99
Copy link
Contributor

mayank99 commented Jan 3, 2023

Components that don't have unique thumbnail:

  • DropdownButton
  • IconButton
  • IdeasButton
  • SplitButton
  • Label

Create thumbnails or combine all buttons into one big buttons doc page?

DropdownButton can go together with DropdownMenu.
IconButton and IdeasButton can go in Button.
SplitButton can go either in Button or in DropdownMenu, and then link back to the other.
Label can go with Input or Typography.

In the future we should make everything searchable so that it doesn't matter where what lives

apps/website/src/examples/Input.main.tsx Show resolved Hide resolved
apps/website/package.json Outdated Show resolved Hide resolved
apps/website/src/pages/docs/textarea.mdx Outdated Show resolved Hide resolved
@r100-stack
Copy link
Member

Components that don't have unique thumbnail:

  • DropdownButton
  • IconButton
  • IdeasButton
  • SplitButton
  • Label

Create thumbnails or combine all buttons into one big buttons doc page?

DropdownButton can go together with DropdownMenu. IconButton and IdeasButton can go in Button. SplitButton can go either in Button or in DropdownMenu, and then link back to the other. Label can go with Input or Typography.

In the future we should make everything searchable so that it doesn't matter where what lives

We could also add a "See also"/"Related" section with links to the related components. Then if there are any related components that are not major enough to get a thumbnail, we can add them to the "See also"/"Related" sections of multiple similar components so that users can find them easily.

E.g.

  • DropdownMenu can point to DropdownButton
  • Button can point to DropdownButton
  • DropdownButton can point to DropdownMenu and Button

Or we could also combine all types of buttons in the Buttons page similar to how ProgressIndicator (L18-32) combines ProgressLinear and ProgressRadial.

@gretanausedaite
Copy link
Contributor Author

DropdownButton can go together with DropdownMenu.

I can't think of a page name that fits both. Maybe add DropdowButton to buttons and leave menu separately?

@gretanausedaite gretanausedaite mentioned this pull request Jan 4, 2023
21 tasks
@gretanausedaite
Copy link
Contributor Author

We could also add a "See also"/"Related" section with links to the related components.

Added task for this in #941

apps/website/src/components/LiveExample.tsx Outdated Show resolved Hide resolved

<LiveExample src={frontmatter.exampleCodeFileSplitButton} />

Pressing this left side of the button will commit the action. Pressing the right side of the button will open a menu. Upon selecting an option from the menu, the action immediately takes place, and the left side of the button’s label will change to match the recent selection.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left side of the button’s label will change to match the recent selection

To confirm, is this valid? Because I don't believe the left button label changes when we click on a menu option.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i believe the wording was copied over from the old page (splitbutton.mdx). it doesn't really matter for this PR

eventually we will validate the wording of every page

@@ -15,7 +15,11 @@ import { createRoot } from 'react-dom/client';
import { ThemeProvider } from '@itwin/itwinui-react';
import App from './App';
import './styles.css';
createRoot(document.getElementById('root')).render(<ThemeProvider theme='dark'><App /></ThemeProvider>);
createRoot(document.getElementById('root')!).render(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the ! have something to do with null safety? Just curious about why is it needed.

Copy link
Contributor

@mayank99 mayank99 Jan 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mayank99 mayank99 merged commit b8e4e5b into main Jan 5, 2023
@mayank99 mayank99 deleted the greta/merge-components-website branch January 5, 2023 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Website: Combine labeled and not labeled components
3 participants