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

refactor: DLT-2122 move css out of recipes #577

Merged
merged 11 commits into from
Dec 5, 2024
Merged

Conversation

juliodialpad
Copy link
Collaborator

Move CSS within vue recipes to dialtone-css

Obligatory GIF (super important!)

Obligatory GIF

🛠️ Type Of Change

These types will increment the version number on release:

  • Refactor

📖 Jira Ticket

https://dialpad.atlassian.net/browse/DLT-2122

📖 Description

  • Moved all CSS within recipes to dialtone-css
  • Renamed classes that were not using BEM (Maybe breaking change)

💡 Context

We're moving all CSS defined in dialtone vue to dialtone-css.

📝 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.

For all Vue changes:

  • I have added / updated unit tests.
  • 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.

🔮 Next Steps

Visually test and review all the recipes to check that everything's still working as expected.

Signed-off-by: Julio Ortega <julio.ortega@dialpad.com>
@juliodialpad juliodialpad added the visual-test-ready Add this tag when the PR is ready for visual test, to trigger GHA visual tests label Nov 30, 2024
@juliodialpad juliodialpad self-assigned this Nov 30, 2024
Signed-off-by: Julio Ortega <julio.ortega@dialpad.com>
Signed-off-by: Julio Ortega <julio.ortega@dialpad.com>
@iropolo
Copy link
Contributor

iropolo commented Dec 3, 2024

I will take a look to this today.

@dialpad dialpad deleted a comment from github-actions bot Dec 4, 2024
@dialpad dialpad deleted a comment from github-actions bot Dec 4, 2024
@dialpad dialpad deleted a comment from github-actions bot Dec 4, 2024
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.

Wow, that's a lotta work, but quite necessary. I didn't go through each line, but here are a few themes I see repeated throughout:

1. There's quite a bit of nesting going on, resulting in over-specific CSS selectors. Unless there's a really good reason, keep them as flat as possible, e.g.

.dt-recipe-attachment-carousel__progress-bar {
  ...
  .dt-recipe-attachment-carousel__progress-bar__circle {
    ...
  }
}

...can probably be...

.dt-recipe-attachment-carousel__progress-bar {
  ...
}
.dt-recipe-attachment-carousel__progress-bar__circle {
  ...
}

...or perhaps...

.dt-recipe-attachment-carousel {
  &__progress-bar {
    ...
  }
  &__progress-bar__circle {
    ...
  }
}

2. The above example also has some double-BEM'ing going on wit __. To take the above as an example, perhaps...

.dt-recipe-attachment-carousel {
  &__progress-bar {
    ...
  }
  &__progress-bar-circle {
    ...
  }
}

It's a case by case judgement call, and naming... things is fun... and hard.

3. Should data-qa values also match BEM convention? I don't have an opinion on that. e.g.

class="dt-recipe-feed-item-row__left-time"
data-qa="dt-recipe-feed-item-row--left-time"

@@ -250,7 +250,7 @@ A node in IVR like branch that has a condition instead of dtmf connector.
:node-type="branch"
>
<template #connector>
<div class="ivr-connector d-px8 d-h24 d-bar-pill d-mbn12 d-fc-neutral-white d-fs-100">Add branch</div>
<div class="dt-recipe-ivr-node__connector d-px8 d-h24 d-bar-pill d-mbn12 d-fc-neutral-white d-fs-100">Add branch</div>
Copy link
Contributor

Choose a reason for hiding this comment

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

Should these CSS utilities values be folded into .dt-recipe-ivr-node__connector? There are a few others like that throughout this diff.

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah I think so for sure

@iropolo
Copy link
Contributor

iropolo commented Dec 4, 2024

Should be ok, the remaining percy error is an icon update (expected).

edit: didn't see Fracis comment. My comment was regarding fixing PR percy errors.

@braddialpad
Copy link
Contributor

Should be ok, the remaining percy error is an icon update (expected).

Seems like there's an additional border problem on the latest build

Copy link
Contributor

@braddialpad braddialpad left a comment

Choose a reason for hiding this comment

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

Since this is such a big change with high potential for conflicts, I'd rather get this into the main branch and make francis' requested changes in a separate PR. The only thing we want to change before merging here are any further visual regressions.

@braddialpad
Copy link
Contributor

Merged in staging, going to see if it fixes the final percy error

Copy link

github-actions bot commented Dec 5, 2024

✔️ Deploy previews ready!
😎 Dialtone preview: https://dialtone.dialpad.com/deploy-previews/pr-577/
😎 Dialtone-vue 2 preview: https://dialtone.dialpad.com/vue/deploy-previews/pr-577/
😎 Dialtone-vue 3 the preview: https://dialtone.dialpad.com/vue3/deploy-previews/pr-577/

@braddialpad
Copy link
Contributor

Alright looks good! I'm going to merge this and create a separate "clean up" PR

@braddialpad braddialpad merged commit 75d5a0b into staging Dec 5, 2024
11 checks passed
@braddialpad braddialpad deleted the move-recipes-css branch December 5, 2024 18:46
braddialpad pushed a commit that referenced this pull request Dec 10, 2024
## [9.86.2](dialtone/v9.86.1...dialtone/v9.86.2) (2024-12-10)

### Bug Fixes

* **Icon:** DLT-2206 fix icon Simultaneous ring ([#579](#579)) ([1435dbd](1435dbd))

### Code Refactoring

* DLT-2122 move css out of recipes ([#577](#577)) ([75d5a0b](75d5a0b))
braddialpad pushed a commit that referenced this pull request Dec 10, 2024
## [1.0.1](combinator/v1.0.0...combinator/v1.0.1) (2024-12-10)

### Code Refactoring

* DLT-2122 move css out of recipes ([#577](#577)) ([75d5a0b](75d5a0b))
braddialpad pushed a commit that referenced this pull request Dec 10, 2024
## [8.46.3](dialtone-css/v8.46.2...dialtone-css/v8.46.3) (2024-12-10)

### Code Refactoring

* DLT-2122 move css out of recipes ([#577](#577)) ([75d5a0b](75d5a0b))
braddialpad pushed a commit that referenced this pull request Dec 10, 2024
## [2.167.1](dialtone-vue2/v2.167.0...dialtone-vue2/v2.167.1) (2024-12-10)

### Code Refactoring

* DLT-2122 move css out of recipes ([#577](#577)) ([75d5a0b](75d5a0b))

### Documentation

* DLT-1799 move SB to docs - Tabs to Validation Messages ([#565](#565)) ([e78aece](e78aece))
braddialpad pushed a commit that referenced this pull request Dec 10, 2024
## [3.160.1](dialtone-vue3/v3.160.0...dialtone-vue3/v3.160.1) (2024-12-10)

### Code Refactoring

* DLT-2122 move css out of recipes ([#577](#577)) ([75d5a0b](75d5a0b))

### Documentation

* DLT-1799 move SB to docs - Tabs to Validation Messages ([#565](#565)) ([e78aece](e78aece))
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.

4 participants