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

feat: in UiQuestion add an optional icon for the Why button #530

Merged
merged 2 commits into from
Sep 12, 2024

Conversation

sonya0504
Copy link
Contributor

Description

It adds an optional icon to the why button in UiQuestion. I need this icon because question about sex has this icon:
image

Related Issue

Closes #

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@sonya0504 sonya0504 requested a review from a team as a code owner September 12, 2024 08:10
@sonya0504 sonya0504 self-assigned this Sep 12, 2024
@@ -295,6 +307,7 @@ const defaultProps = computed(() => {
icon,
...props.iconInfoAttrs,
},
iconWhyAttrs: { ...props.iconWhyAttrs },
Copy link
Contributor

Choose a reason for hiding this comment

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

icon:info it shouldn't be added by default?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think an icon shouldn't be default because it should be visible only for sex question. The rest of the questions have a rationale button without an icon:
image

Copy link
Contributor

Choose a reason for hiding this comment

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

ok, thank_you

@@ -295,6 +307,7 @@ const defaultProps = computed(() => {
icon,
...props.iconInfoAttrs,
},
iconWhyAttrs: { ...props.iconWhyAttrs },
Copy link
Contributor

@pspaczek pspaczek Sep 12, 2024

Choose a reason for hiding this comment

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

Suggested change
iconWhyAttrs: { ...props.iconWhyAttrs },
iconWhyAttrs: {
icon: 'info,
...props.iconWhyAttrs
},

@@ -108,6 +110,11 @@
v-bind="buttonWhyAttrs"
class="ui-button--small ui-button--text"
>
<UiIcon
v-if="iconWhyAttrs.icon"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
v-if="iconWhyAttrs.icon"
v-if="defaultProps.iconWhyAttrs.icon"

Copy link
Contributor

Choose a reason for hiding this comment

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

icon info should be a default view for why and we don't need a new stories

@sonya0504 sonya0504 requested a review from pspaczek September 12, 2024 08:49
@pspaczek pspaczek merged commit f250300 into develop Sep 12, 2024
1 check passed
@pspaczek pspaczek deleted the feat/add_icon_to_the_why_button branch September 12, 2024 11:30
@pspaczek pspaczek mentioned this pull request Sep 12, 2024
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.

3 participants