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

fix(rich-text-editor): DLT-2107 message input recipe updates #522

Merged
merged 19 commits into from
Oct 9, 2024

Conversation

hynes-dialpad
Copy link
Member

@hynes-dialpad hynes-dialpad commented Oct 4, 2024

Message Input Recipe Updates

Obligatory GIF (super important!)

Obligatory GIF

πŸ› οΈ Type Of Change

These types will increment the version number on release:

  • Fix

πŸ“– Jira Ticket

DLT-2107

πŸ“– Description

Jira ticket outlines all changes in PR.

πŸ“ Checklist

For all PRs:

  • I have ensured no private Dialpad links or info are in the code or pull request description (Dialtone is a public repo!).
  • I have reviewed my changes.
  • I have added all relevant documentation.
  • I have considered the performance impact of my change.

For all Vue changes:

  • I have made my changes in Vue 2 and Vue 3. Note: you may sync your changes from Vue 2 to Vue 3 (or vice versa) using the ./scripts/dialtone-vue-sync.sh script. Read docs here: Dialtone Vue Sync Script

For all CSS changes:

  • I have used design tokens whenever possible.
  • I have considered how this change will behave on different screen sizes.
  • I have visually validated my change in light and dark mode.
  • I have used gap or flexbox properties for layout instead of margin whenever possible.

Copy link
Collaborator

@juliodialpad juliodialpad left a comment

Choose a reason for hiding this comment

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

Your linter is doing some magic here, please fix it and update the PR, it's pretty hard to review with all those automatic-linter changes.

You can try with steps 3 and 4 of this article: https://www.digitalocean.com/community/tutorials/linting-and-formatting-with-eslint-in-vs-code

Copy link

github-actions bot commented Oct 7, 2024

Please add either the visual-test-ready or no-visual-test label to this PR depending on whether you want to run visual tests or not.
It is recommended to run visual tests if your PR changes any UI. ‼️

@hynes-dialpad hynes-dialpad changed the title DLT-2107 message input recipe updates fix(rich-text-editor): DLT-2107 message input recipe updates Oct 7, 2024
@hynes-dialpad hynes-dialpad added the visual-test-ready Add this tag when the PR is ready for visual test, to trigger GHA visual tests label Oct 7, 2024
@hynes-dialpad hynes-dialpad self-assigned this Oct 7, 2024
@hynes-dialpad
Copy link
Member Author

@juliodialpad I think I had some bad merges, so I reverted many of my changes to a solid point and re-implemented them. It looks like everything is building correctly now, so if you could review it, that would be appreciated! Thanks.

@ninamarina
Copy link
Contributor

ninamarina commented Oct 7, 2024

This is how I am seeing the preview in Vue 2, the buttons are not horizontally aligned:

image

And in Vue 3, there's an opacity for all the buttons that I don't think it's intended:

image

@hynes-dialpad
Copy link
Member Author

@ninamarina Thanks for the catch. I mis-spelled "direction" (as directon). I've corrected it in the subsequent commit.

As far as the opacity, it's something we can discuss. That is intentional (and is now reflected in Vue2 as well). The idea is that when the message input is in focus, we reduce the color strength of the buttons. I've reduced the opacity amount from 50% to 75% to make it a bit more subtle, but still cut the strength.

{{ showAddLink.setLinkTitle }}
</span>
<dt-input
v-model="linkInput"
:input-aria-label="showAddLink.setLinkInputAriaLabel"
data-qa="dt-editor-link-input"
:placeholder="setLinkPlaceholder"
input-wrapper-class="d-bgc-black-100 d-mt6 d-bar5 d-ba d-baw1 d-bc-black-300 d-py2 d-ol-none"
input-wrapper-class="d-bgc-secondary d-mt6 d-bar5 d-ba d-baw1 d-bc-default d-py2 d-ol-none"
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these changes in the Editor component intended?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes. We shouldn't be using raw color tokens, especially when we have semantic surface and border color tokens that match appropriately. Can you confirm @francisrupert ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Of course, especially as they align to the Figma color use.

Copy link
Member Author

Choose a reason for hiding this comment

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

Did realize though that the Vue sync scripts didn't copy over the updated classes from Vue3 to Vue2. Updated in Vue2 editor.vue now.

@ninamarina
Copy link
Contributor

@hynes-dialpad just left you some comments, let me know if you need help with any of those

@hynes-dialpad
Copy link
Member Author

Thanks @ninamarina! I've made the necessary updates based on your feedback.

@francisrupert
Copy link
Contributor

As far as the opacity ... when the message input is in focus, we reduce the color strength of the buttons.

It appears to be doing it on hover too, not just focus. Feels very odd, though I suppose it can still make sense since they're still actionable.

Screen.Recording.2024-10-07.at.12.13.23.PM.mov

@hynes-dialpad
Copy link
Member Author

hynes-dialpad commented Oct 7, 2024

It appears to be doing it on hover too, not just focus. Feels very odd, though I suppose it can still make sense since they're still actionable.

@francisrupert Yeah, I added that after Nina's comment so that, on hover, the opacity reverts to normal levels so they don't look disabled.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Your linter is still doing a lot of changes on this file

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm using VS Studio so not sure how.

@francisrupert
Copy link
Contributor

Text only button spacing.

image

Copy link
Contributor

@francisrupert francisrupert left a comment

Choose a reason for hiding this comment

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

Approve from design perspective, including with Percy. Looks like the main followup is what Tico called out as a separate task to replace CSS Utilities with a custom style specific to this component to avoid CSS specificity battles when consuming and adjusting further.

Copy link
Collaborator

@juliodialpad juliodialpad left a comment

Choose a reason for hiding this comment

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

Looks good now, thanks! Just apply the suggested changes before merging.

Copy link

github-actions bot commented Oct 9, 2024

βœ”οΈ Deploy previews ready!
😎 Dialtone preview: https://dialtone.dialpad.com/deploy-previews/pr-522/
😎 Dialtone-vue 2 preview: https://dialtone.dialpad.com/vue/deploy-previews/pr-522/
😎 Dialtone-vue 3 the preview: https://dialtone.dialpad.com/vue3/deploy-previews/pr-522/

@hynes-dialpad hynes-dialpad merged commit 639a72e into staging Oct 9, 2024
13 checks passed
@hynes-dialpad hynes-dialpad deleted the DLT-2107-message-input-recipe-updates branch October 9, 2024 17:18
juliodialpad pushed a commit that referenced this pull request Oct 11, 2024
## [9.79.2](dialtone/v9.79.1...dialtone/v9.79.2) (2024-10-11)

### Bug Fixes

* DLT-1548 fix opacity classes selectors ([#520](#520)) ([1e6ef93](1e6ef93))
* **Rich Text Editor:** DLT-2107 message input recipe updates ([#522](#522)) ([639a72e](639a72e))
juliodialpad pushed a commit that referenced this pull request Oct 11, 2024
## [2.163.2](dialtone-vue2/v2.163.1...dialtone-vue2/v2.163.2) (2024-10-11)

### Bug Fixes

* DLT-1548 fix opacity classes selectors ([#520](#520)) ([1e6ef93](1e6ef93))
* **Rich Text Editor:** DLT-2107 message input recipe updates ([#522](#522)) ([639a72e](639a72e))
juliodialpad pushed a commit that referenced this pull request Oct 11, 2024
## [3.156.2](dialtone-vue3/v3.156.1...dialtone-vue3/v3.156.2) (2024-10-11)

### Bug Fixes

* DLT-1548 fix opacity classes selectors ([#520](#520)) ([1e6ef93](1e6ef93))
* **Rich Text Editor:** DLT-2107 message input recipe updates ([#522](#522)) ([639a72e](639a72e))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
visual-test-ready Add this tag when the PR is ready for visual test, to trigger GHA visual tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants