Remove twenty-ui-deprecated and migrate frontend to twenty-ui (#21596)
Migrates `twenty-front`, `twenty-sdk`, and `twenty-front-component-renderer` from `twenty-ui-deprecated` to `twenty-ui` (mechanical import swap — the packages have API parity) and deletes the deprecated package along with its workspace/CI/config wiring. Also adds `@linaria/react`/`@linaria/core` as direct deps of `twenty-front` (it used them transitively via the deprecated package). Note: move the required status check from `ci-ui-status-check` to `ci-new-ui-status-check`. Argos: the Storybook box-model/button-reset baseline shift (the bulk of the visual diffs) is isolated in #21665 — Storybook now loads twenty-ui's global `reset.scss`, which the production app already ships. Once #21665 merges and this branch is rebased, the remaining Argos diffs are component-level visual-parity items only.
This commit is contained in:
@@ -10,7 +10,7 @@ name: Visual Regression Dispatch
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ['CI UI', 'CI New UI', 'CI Front']
|
||||
workflows: ['CI New UI', 'CI Front']
|
||||
types: [completed]
|
||||
|
||||
permissions:
|
||||
@@ -39,11 +39,10 @@ jobs:
|
||||
script: |
|
||||
const name = context.payload.workflow_run.name;
|
||||
const projectByWorkflow = {
|
||||
'CI UI': 'twenty-ui',
|
||||
'CI New UI': 'twenty-new-ui',
|
||||
'CI Front': 'twenty-front',
|
||||
};
|
||||
const project = projectByWorkflow[name] ?? 'twenty-ui';
|
||||
const project = projectByWorkflow[name] ?? 'twenty-front';
|
||||
const artifactName = `argos-screenshots-${project}`;
|
||||
core.setOutput('workflow_name', name);
|
||||
core.setOutput('project', project);
|
||||
@@ -187,89 +186,3 @@ jobs:
|
||||
fi
|
||||
|
||||
gh workflow run post-visual-regression-comment.yaml --repo twentyhq/ci-privileged --ref main "${ARGS[@]}"
|
||||
|
||||
# ── Dispatch: cross-comparison baseline (CI UI on main → twenty-ui-vs-new-ui) ──
|
||||
dispatch-comparison-baseline:
|
||||
needs: resolve-context
|
||||
if: >-
|
||||
needs.resolve-context.outputs.workflow_name == 'CI UI' &&
|
||||
needs.resolve-context.outputs.has_artifact == 'true' &&
|
||||
github.event.workflow_run.event == 'push' &&
|
||||
github.event.workflow_run.head_branch == 'main'
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- name: Mint ci-privileged dispatch token
|
||||
id: app-token
|
||||
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
|
||||
with:
|
||||
client-id: ${{ vars.TWENTY_WORKFLOW_DISPATCHER_CLIENT_ID }}
|
||||
private-key: ${{ secrets.TWENTY_WORKFLOW_DISPATCHER_PRIVATE_KEY }}
|
||||
owner: twentyhq
|
||||
repositories: ci-privileged
|
||||
permission-actions: write
|
||||
|
||||
- name: Dispatch to ci-privileged (comparison baseline)
|
||||
env:
|
||||
GH_TOKEN: ${{ steps.app-token.outputs.token }}
|
||||
WORKFLOW_RUN_ID: ${{ github.event.workflow_run.id }}
|
||||
REPOSITORY: ${{ github.repository }}
|
||||
BRANCH: ${{ github.event.workflow_run.head_branch }}
|
||||
COMMIT: ${{ github.event.workflow_run.head_sha }}
|
||||
ARTIFACT_NAME: ${{ needs.resolve-context.outputs.artifact_name }}
|
||||
run: |
|
||||
gh workflow run post-visual-regression-comment.yaml --repo twentyhq/ci-privileged --ref main \
|
||||
-f project="twenty-ui-vs-new-ui" \
|
||||
-f artifact_name="$ARTIFACT_NAME" \
|
||||
-f run_id="$WORKFLOW_RUN_ID" \
|
||||
-f repo="$REPOSITORY" \
|
||||
-f branch="$BRANCH" \
|
||||
-f commit="$COMMIT"
|
||||
|
||||
# ── Dispatch: cross-comparison PR (CI New UI on PRs → twenty-ui-vs-new-ui) ──
|
||||
dispatch-comparison-pr:
|
||||
needs: resolve-context
|
||||
if: >-
|
||||
needs.resolve-context.outputs.workflow_name == 'CI New UI' &&
|
||||
needs.resolve-context.outputs.has_artifact == 'true' &&
|
||||
needs.resolve-context.outputs.is_pr == 'true' &&
|
||||
github.event.workflow_run.event == 'pull_request'
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- name: Mint ci-privileged dispatch token
|
||||
id: app-token
|
||||
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
|
||||
with:
|
||||
client-id: ${{ vars.TWENTY_WORKFLOW_DISPATCHER_CLIENT_ID }}
|
||||
private-key: ${{ secrets.TWENTY_WORKFLOW_DISPATCHER_PRIVATE_KEY }}
|
||||
owner: twentyhq
|
||||
repositories: ci-privileged
|
||||
permission-actions: write
|
||||
|
||||
- name: Dispatch to ci-privileged (comparison PR)
|
||||
env:
|
||||
GH_TOKEN: ${{ steps.app-token.outputs.token }}
|
||||
WORKFLOW_RUN_ID: ${{ github.event.workflow_run.id }}
|
||||
REPOSITORY: ${{ github.repository }}
|
||||
BRANCH: ${{ github.event.workflow_run.head_branch }}
|
||||
COMMIT: ${{ github.event.workflow_run.head_sha }}
|
||||
PR_NUMBER: ${{ needs.resolve-context.outputs.pr_number }}
|
||||
REFERENCE_COMMIT: ${{ needs.resolve-context.outputs.merge_base_sha }}
|
||||
ARTIFACT_NAME: ${{ needs.resolve-context.outputs.artifact_name }}
|
||||
run: |
|
||||
ARGS=(
|
||||
-f project="twenty-ui-vs-new-ui"
|
||||
-f artifact_name="$ARTIFACT_NAME"
|
||||
-f run_id="$WORKFLOW_RUN_ID"
|
||||
-f repo="$REPOSITORY"
|
||||
-f branch="$BRANCH"
|
||||
-f commit="$COMMIT"
|
||||
-f pr_number="$PR_NUMBER"
|
||||
)
|
||||
|
||||
if [ -n "$REFERENCE_COMMIT" ]; then
|
||||
ARGS+=(-f reference_commit="$REFERENCE_COMMIT")
|
||||
fi
|
||||
|
||||
gh workflow run post-visual-regression-comment.yaml --repo twentyhq/ci-privileged --ref main "${ARGS[@]}"
|
||||
|
||||
Reference in New Issue
Block a user