Skip to content

Commit

Permalink
Merge branch 'dev' into josercarcamo/8623-respect-user-hidden-attribu…
Browse files Browse the repository at this point in the history
…te-v2
  • Loading branch information
josercarcamo authored Jan 22, 2025
2 parents d867b85 + e3523e5 commit 26f24a1
Show file tree
Hide file tree
Showing 24 changed files with 546 additions and 292 deletions.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/enhancement.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ body:
- label: "@esri/calcite-components"
- label: "@esri/calcite-components-react"
- label: "@esri/calcite-design-tokens"
- label: "@esri/calcite-ui-icons"
- label: "@esri/eslint-plugin-calcite-components"
- type: dropdown
id: esri-team
Expand Down
33 changes: 33 additions & 0 deletions .github/scripts/notifyAboutIconRequest.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// @ts-check

// If the "calcite-ui-icons" label is added to an issue, generates a notification to the Icons team leads to review
// The secret is formatted like so: icon-team-member-1, icon-team-member-2, icon-team-member-3
// Note the script automatically adds the "@" character in to notify the icon team lead(s)

/** @param {import('github-script').AsyncFunctionArguments} AsyncFunctionArguments */
module.exports = async ({ github, context }) => {
const { repo, owner } = context.repo;

const payload = /** @type {import('@octokit/webhooks-types').IssuesLabeledEvent} */ (context.payload);
const {
issue: { number },
} = payload;

const { ICONS_TEAM } = process.env;

// Add a "@" character to notify the user
const icon_leads = ICONS_TEAM?.split(",").map((v) => " @" + v.trim());

if (!icon_leads?.length) {
console.error("unable to determine icon leads");
process.exit(1);
}

// Add a comment to issues with the 'calcite-ui-icons' label to notify icon team lead(s)
await github.rest.issues.createComment({
owner,
repo,
issue_number: number,
body: `cc ${icon_leads}`,
});
};
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ try {
const deleteQuery = `mutation { deleteProjectV2Item(input: {projectId: "${projectItem.project.id}", itemId: "${projectItem.id}"}) { clientMutationId } }`;
runQuery(deleteQuery);
createComment(
`The issue has been removed from the [${projectItem.project.title}](${projectItem.project.url}) project.`,
`This issue has been removed from the [${projectItem.project.title}](${projectItem.project.url}) project.`,
);
console.log("Issue removed from project.");
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
steps:
- uses: actions/checkout@v4

- name : "Assign for verification"
- name: "Assign for verification"
if: github.event.label.name == '3 - installed'
uses: actions/github-script@v7
env:
Expand Down Expand Up @@ -51,3 +51,12 @@ jobs:
const action = require('${{ github.workspace }}/.github/scripts/notifyAboutNewComponent.js')
await action({github, context, core})
- name: "Icon request notification"
if: github.event.label.name == 'calcite-ui-icons'
uses: actions/github-script@v7
env:
ICONS_TEAM: ${{secrets.ICON_LEADS}}
with:
script: |
const action = require('${{ github.workspace }}/.github/scripts/notifyAboutIconRequest.js')
await action({github, context, core})
4 changes: 2 additions & 2 deletions .github/workflows/remove-issue-from-design-projects.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Archive Issue in Project
name: Remove Issue From Project

on:
issues:
Expand All @@ -18,7 +18,7 @@ jobs:
with:
node-version-file: package.json

- name: Archive Issue
- name: Remove Issue
env:
GITHUB_TOKEN: ${{ secrets.ADMIN_TOKEN }}
OWNER: ${{ github.repository_owner }}
Expand Down
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions packages/calcite-components-react/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [3.0.0-next.106](https://github.com/Esri/calcite-design-system/compare/@esri/[email protected]...@esri/[email protected]) (2025-01-22)

**Note:** Version bump only for package @esri/calcite-components-react

## [3.0.0-next.105](https://github.com/Esri/calcite-design-system/compare/@esri/[email protected]...@esri/[email protected]) (2025-01-17)

**Note:** Version bump only for package @esri/calcite-components-react
Expand Down
4 changes: 2 additions & 2 deletions packages/calcite-components-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@esri/calcite-components-react",
"version": "3.0.0-next.105",
"version": "3.0.0-next.106",
"description": "A set of React components that wrap calcite components",
"homepage": "https://developers.arcgis.com/calcite-design-system/",
"repository": {
Expand All @@ -26,7 +26,7 @@
"tsc": "tsc"
},
"dependencies": {
"@esri/calcite-components": "3.0.0-next.105",
"@esri/calcite-components": "3.0.0-next.106",
"@lit/react": "1.0.7"
},
"peerDependencies": {
Expand Down
13 changes: 13 additions & 0 deletions packages/calcite-components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,19 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [3.0.0-next.106](https://github.com/Esri/calcite-design-system/compare/@esri/[email protected]...@esri/[email protected]) (2025-01-22)

### Features

- **button:** add component tokens ([#10358](https://github.com/Esri/calcite-design-system/issues/10358)) ([a7dc494](https://github.com/Esri/calcite-design-system/commit/a7dc4945bbf9cfabc54a81e8321ac128124ceb8b)), closes [#7180](https://github.com/Esri/calcite-design-system/issues/7180) [#11210](https://github.com/Esri/calcite-design-system/issues/11210)
- **panel:** control panel header action tokens ([#11300](https://github.com/Esri/calcite-design-system/issues/11300)) ([45f573f](https://github.com/Esri/calcite-design-system/commit/45f573f29d3ed5ffa6eef8420dde3905d16b1c83))

### Bug Fixes

- **color-picker:** fix error caused by initial value with a different format ([#11351](https://github.com/Esri/calcite-design-system/issues/11351)) ([1d187da](https://github.com/Esri/calcite-design-system/commit/1d187daf65e5f0e4f062283e9df10a310e52d3d6)), closes [#10731](https://github.com/Esri/calcite-design-system/issues/10731) [#10310](https://github.com/Esri/calcite-design-system/issues/10310)
- **combobox, input-time-zone:** fix initial item selection delay ([#11326](https://github.com/Esri/calcite-design-system/issues/11326)) ([59ab243](https://github.com/Esri/calcite-design-system/commit/59ab24368455cc968e990ea2d35f44a6949e4726)), closes [#10731](https://github.com/Esri/calcite-design-system/issues/10731)
- **tree:** render lines correctly in RTL direction ([#11346](https://github.com/Esri/calcite-design-system/issues/11346)) ([7df1b15](https://github.com/Esri/calcite-design-system/commit/7df1b1555a85eda52e52f6b64457bfbdd25825c7)), closes [#11334](https://github.com/Esri/calcite-design-system/issues/11334)

## [3.0.0-next.105](https://github.com/Esri/calcite-design-system/compare/@esri/[email protected]...@esri/[email protected]) (2025-01-17)

**Note:** Version bump only for package @esri/calcite-components
Expand Down
4 changes: 2 additions & 2 deletions packages/calcite-components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@esri/calcite-components",
"version": "3.0.0-next.105",
"version": "3.0.0-next.106",
"description": "Web Components for Esri's Calcite Design System.",
"homepage": "https://developers.arcgis.com/calcite-design-system/",
"repository": {
Expand Down Expand Up @@ -72,7 +72,7 @@
"@arcgis/components-controllers": "^4.32.0-next.81",
"@arcgis/components-utils": "^4.32.0-next.81",
"@arcgis/lumina": "^4.32.0-next.81",
"@esri/calcite-ui-icons": "4.0.0-next.9",
"@esri/calcite-ui-icons": "4.0.0-next.10",
"@floating-ui/dom": "^1.6.12",
"@floating-ui/utils": "^0.2.8",
"@types/color": "^4.2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
@apply shadow-2
inline-flex
flex-col
overflow-y-auto;
overflow-hidden;

gap: var(--calcite-action-pad-items-space, 0);
border-radius: calc(var(--calcite-action-pad-corner-radius, 0.125rem) * 2) /* 4px */;
Expand Down
57 changes: 56 additions & 1 deletion packages/calcite-components/src/components/button/button.e2e.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @ts-strict-ignore
import { newE2EPage, E2EElement } from "@arcgis/lumina-compiler/puppeteerTesting";
import { describe, expect, it } from "vitest";
import { accessible, defaults, disabled, hidden, HYDRATED_ATTR, labelable, t9n } from "../../tests/commonTests";
import { accessible, defaults, disabled, hidden, HYDRATED_ATTR, labelable, t9n, themed } from "../../tests/commonTests";
import { GlobalTestProps } from "../../tests/utils";
import { html } from "../../../support/formatting";
import { CSS } from "./resources";
Expand Down Expand Up @@ -713,4 +713,59 @@ describe("calcite-button", () => {
expect(elementHost).toEqualAttribute("width", "full");
expect(await elementAsButton.getComputedStyle()["width"]).toEqual(await elementHost.getComputedStyle()["width"]);
});

describe("theme", () => {
describe("default", () => {
themed("calcite-button", {
"--calcite-button-background-color": {
shadowSelector: "button",
targetProp: "backgroundColor",
},
"--calcite-button-corner-radius": {
shadowSelector: "button",
targetProp: "borderRadius",
},
"--calcite-button-text-color": {
shadowSelector: "button",
targetProp: "color",
},
"--calcite-button-border-color": {
shadowSelector: "button",
targetProp: "borderColor",
},
});
});
describe("loading", () => {
themed(html`<calcite-button loading></calcite-button>`, {
"--calcite-button-background-color": {
shadowSelector: "button",
targetProp: "backgroundColor",
},
"--calcite-button-corner-radius": {
shadowSelector: "button",
targetProp: "borderRadius",
},
"--calcite-button-text-color": {
shadowSelector: "button",
targetProp: "color",
},
"--calcite-button-loader-color": {
shadowSelector: `.${CSS.loadingIn}`,
targetProp: "color",
},
"--calcite-button-border-color": {
shadowSelector: "button",
targetProp: "borderColor",
},
});
});
describe("outline", () => {
themed(html`<calcite-button appearance="outline"></calcite-button>`, {
"--calcite-button-border-color": {
shadowSelector: "button",
targetProp: "borderColor",
},
});
});
});
});
Loading

0 comments on commit 26f24a1

Please sign in to comment.