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

docs: icon #774

Merged
merged 11 commits into from
Oct 4, 2024
Merged

docs: icon #774

merged 11 commits into from
Oct 4, 2024

Conversation

ethanalvizo
Copy link
Contributor

Closes #732

@ethanalvizo ethanalvizo self-assigned this Aug 26, 2024
Copy link
Contributor

@dsmmcken dsmmcken left a comment

Choose a reason for hiding this comment

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

Update after #696 merges.

We should have an example that shows and searches all icons, similar to what we do in our internal style guide. Does how it's defined in types allow to iterate that?

@ethanalvizo ethanalvizo requested a review from dsmmcken September 6, 2024 18:21
Copy link
Contributor

@dsmmcken dsmmcken left a comment

Choose a reason for hiding this comment

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

update to use prefix less icons.

I would use "filter", "bell" or "squirrel"

@ethanalvizo
Copy link
Contributor Author

ethanalvizo commented Sep 13, 2024

update to use prefix less icons.

I would use "filter", "bell" or "squirrel"

@dsmmcken I'm assuming this is for the search example with all the available icons. Does this mean I should remove the dh icons since we decided to always add the prefix for those to avoid conflict (previous icon PR)?

@dsmmcken
Copy link
Contributor

I meant that in context of instead of all the example saying "dhTruck".

The search thing should use a ui.grid to look orderly instead of flex.

plugins/ui/docs/components/icon.md Outdated Show resolved Hide resolved
plugins/ui/docs/components/icon.md Outdated Show resolved Hide resolved
plugins/ui/docs/components/icon.md Outdated Show resolved Hide resolved
Comment on lines 92 to 107
Icons in Spectrum support four semantic colors: negative, notice, positive, and informative. While icons within React Spectrum components are usually styled with the appropriate colors, you can use the `color` prop to customize the color of standalone icons.

```python
from deephaven import ui


@ui.component
def icons():
negative = ui.icon(name="bell", color="negative")
informative = ui.icon(name="bell", color="informative")
positive = ui.icon(name="bell", color="positive")

return [negative, informative, positive]


my_icons = icons()
Copy link
Contributor

Choose a reason for hiding this comment

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

Create a follow up ticket. Icons should accept our theme colors rather than just these from spectrum,

Copy link
Contributor Author

Choose a reason for hiding this comment

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

plugins/ui/docs/components/icon.md Outdated Show resolved Hide resolved

@ui.component
def icons():
icon = ui.icon(name="filter")
Copy link
Contributor

@dsmmcken dsmmcken Oct 1, 2024

Choose a reason for hiding this comment

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

named arg is optional no? Should we be showing it as just ui.icon("filter") everywhere without the named arg or at least here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup it is optional it would only cause an issue if they put the icon name after another prop but I don't think that would happen often (ie. ui.icon(size="S", "bell")) so I just removed the name arg from all the examples

@ethanalvizo ethanalvizo merged commit afa4faf into deephaven:main Oct 4, 2024
17 checks passed
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.

docs: ui.icon
3 participants