Skip to content

Commit

Permalink
Merge branch 'main' into list-item-focus-on-click
Browse files Browse the repository at this point in the history
  • Loading branch information
NakataCode committed Nov 29, 2024
2 parents d0ee43b + 51139c2 commit b708ede
Show file tree
Hide file tree
Showing 214 changed files with 6,055 additions and 1,539 deletions.
113 changes: 113 additions & 0 deletions .github/actions/mergeReleaseChangelog.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
import { promises as fs } from 'node:fs';

const extractChangelogSections = (releaseBody) => {
const fixes = [];
const features = [];
const fixesMatch = releaseBody.match(/## Bug Fixes([\s\S]*?)(?=##|$)/);
const featuresMatch = releaseBody.match(/## Features([\s\S]*?)(?=##|$)/);

if (fixesMatch) {
// Split lines, trim whitespace, and remove any leading bullet point (like "*" or "-")
const fixEntries = fixesMatch[1].trim().split('\n').map(line => line.replace(/^[*-]\s*/, '').trim());
fixes.push(...fixEntries);
}
if (featuresMatch) {
const featureEntries = featuresMatch[1].trim().split('\n').map(line => line.replace(/^[*-]\s*/, '').trim());
features.push(...featureEntries);
}

return { fixes, features };
};

const mergeReleaseChangelogs = (minorRelease, rcReleases) => {
// Extract the existing changes from the minor release body
const { fixes: minorFixes, features: minorFeatures } = extractChangelogSections(minorRelease.body);
const fixes = [...minorFixes];
const features = [...minorFeatures];

// Add changes from each RC release
rcReleases.forEach((release) => {
const { fixes: rcFixes, features: rcFeatures } = extractChangelogSections(release.body);
fixes.push(...rcFixes);
features.push(...rcFeatures);
})

// Sort fixes and features alphabetically
const sortedFixes = fixes.sort((a, b) => {
const contentA = a.match(/\*\*(.*?)\*\*/)?.[1] || '';
const contentB = b.match(/\*\*(.*?)\*\*/)?.[1] || '';
return contentA.localeCompare(contentB);
});

const sortedFeatures = features.sort((a, b) => {
const contentA = a.match(/\*\*(.*?)\*\*/)?.[1] || '';
const contentB = b.match(/\*\*(.*?)\*\*/)?.[1] || '';
return contentA.localeCompare(contentB);
});

return { fixes: sortedFixes, features: sortedFeatures };
}

const updateRelease = async (releaseContext) => {
const releaseId = releaseContext.minorRelease.id;
const releaseHeaderMatch = releaseContext.minorRelease.body.match(/^#\s\[.*?\]\(.*?\)\s\([\d-]+\)/);
const releaseHeader = releaseHeaderMatch ? `${releaseHeaderMatch[0]}\n\n` : '';
const formattedFixes = releaseContext.fixes.length ? `### Fixes\n- ${releaseContext.fixes.join('\n- ')}` : '';
const formattedFeatures = releaseContext.features.length ? `### Features\n- ${releaseContext.features.join('\n- ')}` : '';
const body = `${releaseHeader}${formattedFixes}\n\n${formattedFeatures}`.trim();

try {
await releaseContext.github.request('PATCH /repos/{owner}/{repo}/releases/{releaseId}', {
owner: releaseContext.owner,
repo: releaseContext.repo,
body,
releaseId,
});

console.log(`Release ${releaseContext.version} updated successfully:`, releaseContext);
} catch (error) {
console.error(`Error updating release ${releaseContext.version}:`, error );
}
};

/**
* Publishes comments to issues that are fixed and released.
* @param options {object}
* @param options.github {import("@octokit/rest/dist-types/index.d.ts").Octokit}
* @param options.context
*/
export default async function run({ github, context }) {
const lerna = await fs.readFile(new URL('../../lerna.json', import.meta.url), 'utf8');
const { version } = JSON.parse(lerna);

if (!version.startsWith("2")) {
console.warn('Skip: the task is relevant for version 2');
return;
}

try {
const { owner, repo } = context.repo;
const allReleases = (await github.request('GET /repos/{owner}/{repo}/releases', { owner, repo })).data;
const rcReleases = allReleases.filter((release) => release.tag_name.includes(`v${version}-rc`));
const minorRelease = allReleases.find((release) => release.tag_name === `v${version}`);

// Merge RC changelogs
const { fixes, features } = await mergeReleaseChangelogs(minorRelease, rcReleases);

const minorReleaseContext = {
github,
version,
owner,
repo,
minorRelease,
fixes,
features
}

// Update the minor release with aggregated changelog
await updateRelease(minorReleaseContext);

} catch (error) {
console.error('Error:', error);
}
}
34 changes: 34 additions & 0 deletions .github/workflows/merge-release-changelog.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Merge Release Changelog

on: workflow_dispatch

jobs:
merge-release-changelog:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
issues: write
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.UI5_WEBCOMP_BOT_GH_TOKEN }}
fetch-depth: 0
- uses: actions/setup-node@v4.1.0
with:
node-version: 20
cache: 'yarn'

- name: Install
run: yarn --frozen-lockfile

- name: Merge Release Changelog
uses: actions/github-script@v7
env:
GH_TOKEN: ${{ secrets.UI5_WEBCOMP_BOT_GH_TOKEN }}
with:
github-token: ${{ secrets.UI5_WEBCOMP_BOT_GH_TOKEN }}
script: |
const mergeReleaseChangelog = (await import('${{ github.workspace }}/.github/actions/mergeReleaseChangelog.mjs')).default;
await mergeReleaseChangelog({ github , context });
13 changes: 12 additions & 1 deletion .github/workflows/release-stable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,15 @@ jobs:
script: |
const commentOnFixedIssues = (await import('${{ github.workspace }}/.github/actions/commentOnFixedIssues.mjs')).default;
await commentOnFixedIssues({ github, context });
await commentOnFixedIssues({ github, context });
- name: Merge Release Changelog
uses: actions/github-script@v7
env:
GH_TOKEN: ${{ secrets.UI5_WEBCOMP_BOT_GH_TOKEN }}
with:
github-token: ${{ secrets.UI5_WEBCOMP_BOT_GH_TOKEN }}
script: |
const mergeReleaseChangelog = (await import('${{ github.workspace }}/.github/actions/mergeReleaseChangelog.mjs')).default;
await mergeReleaseChangelog({ github , context });
92 changes: 92 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,98 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [2.5.0-rc.2](https://github.com/SAP/ui5-webcomponents/compare/v2.5.0-rc.1...v2.5.0-rc.2) (2024-11-28)


### Bug Fixes

* **ui5-input:** set value after preventDefault of input event ([#10196](https://github.com/SAP/ui5-webcomponents/issues/10196)) ([e2a6c94](https://github.com/SAP/ui5-webcomponents/commit/e2a6c94d6b4d88db61d85313f2776a092152478d)), closes [#9988](https://github.com/SAP/ui5-webcomponents/issues/9988)
* **ui5-radio-button:** fix aria-disabled and focus of the read-only radio buttons ([#10111](https://github.com/SAP/ui5-webcomponents/issues/10111)) ([3bcfd1d](https://github.com/SAP/ui5-webcomponents/commit/3bcfd1d26b8520b73be336558f590e1b89c4d0c3)), closes [#10025](https://github.com/SAP/ui5-webcomponents/issues/10025)
* **ui5-tokenizer:** adjust touch area for cozy and compact ([#10215](https://github.com/SAP/ui5-webcomponents/issues/10215)) ([ee90aea](https://github.com/SAP/ui5-webcomponents/commit/ee90aeaae00a3a888a8dafae73cb7dba1bf8e51f))
* **ui5-wizard:** stacked Wizard Steps are aligned properly ([#10250](https://github.com/SAP/ui5-webcomponents/issues/10250)) ([3473fbf](https://github.com/SAP/ui5-webcomponents/commit/3473fbf7dd6f97d0de70a540d412c36901455926)), closes [#9779](https://github.com/SAP/ui5-webcomponents/issues/9779)


### Features

* **ui5-combobox:** adjust arrow-down behavior ([#10166](https://github.com/SAP/ui5-webcomponents/issues/10166)) ([74616dc](https://github.com/SAP/ui5-webcomponents/commit/74616dc7ea533ecbd18265878c90339e10eb9d1b))
* **ui5-form:** add new `emptySpan` property ([#10194](https://github.com/SAP/ui5-webcomponents/issues/10194)) ([48b0cc8](https://github.com/SAP/ui5-webcomponents/commit/48b0cc89b36dd859dd07c17021eedf7a99375150)), closes [#9963](https://github.com/SAP/ui5-webcomponents/issues/9963)
* **ui5-list:** add Home and End key handling for Load More button ([#10206](https://github.com/SAP/ui5-webcomponents/issues/10206)) ([7059e09](https://github.com/SAP/ui5-webcomponents/commit/7059e0987960f62cd5b8740594b907fa98e1f11c))





# [2.5.0-rc.1](https://github.com/SAP/ui5-webcomponents/compare/v2.5.0-rc.0...v2.5.0-rc.1) (2024-11-21)


### Bug Fixes

* **ui5-dialog:** width on mobile is not bigger than the phone width ([#10199](https://github.com/SAP/ui5-webcomponents/issues/10199)) ([77af592](https://github.com/SAP/ui5-webcomponents/commit/77af592c238ad53502c09f142d33f7c66c6b0715)), closes [#10000](https://github.com/SAP/ui5-webcomponents/issues/10000)
* **ui5-table:** text cut due to column overflow ([#10193](https://github.com/SAP/ui5-webcomponents/issues/10193)) ([b59d718](https://github.com/SAP/ui5-webcomponents/commit/b59d718dca80bd9a8ee65993ddc2358ecd127024)), closes [#10168](https://github.com/SAP/ui5-webcomponents/issues/10168)


### Features

* **ui5-form:** enable vertical alignment of form items ([#10165](https://github.com/SAP/ui5-webcomponents/issues/10165)) ([13b571b](https://github.com/SAP/ui5-webcomponents/commit/13b571baf0b225dfabc4739be64dd64a34cc5506))
* **ui5-toolbar:** fixed spacer behavior ([#10177](https://github.com/SAP/ui5-webcomponents/issues/10177)) ([b3625ac](https://github.com/SAP/ui5-webcomponents/commit/b3625ac7426aa592b80f50e15147c18ccc7d2abd)), closes [#10104](https://github.com/SAP/ui5-webcomponents/issues/10104)





# [2.5.0-rc.0](https://github.com/SAP/ui5-webcomponents/compare/v2.4.1-rc.0...v2.5.0-rc.0) (2024-11-14)


### Bug Fixes

* **ui5-card-header:** update interactive property documentation ([#10143](https://github.com/SAP/ui5-webcomponents/issues/10143)) ([23289d4](https://github.com/SAP/ui5-webcomponents/commit/23289d4d1696d0441823d98f71b5e21b617777c3))
* **ui5-dynamic-page:** move subheading slot outside the title wrapper ([#10163](https://github.com/SAP/ui5-webcomponents/issues/10163)) ([6466b8a](https://github.com/SAP/ui5-webcomponents/commit/6466b8ad7f73c85a5c105dea3c196f6bfb78f27a))
* **ui5-table-growing:** button is shown despite scroll type ([#10142](https://github.com/SAP/ui5-webcomponents/issues/10142)) ([950441b](https://github.com/SAP/ui5-webcomponents/commit/950441b7d272e8cd20499461f4cfa05ad3ac7510)), closes [#10045](https://github.com/SAP/ui5-webcomponents/issues/10045)


### Features

* **ui5-color-picker:** add simplified display mode ([#10153](https://github.com/SAP/ui5-webcomponents/issues/10153)) ([bf9c0d6](https://github.com/SAP/ui5-webcomponents/commit/bf9c0d653be5af5473a7b616f2c91803db46beb3)), closes [#9979](https://github.com/SAP/ui5-webcomponents/issues/9979)
* **ui5-combobox/multi-combobox:** physical items ([#10051](https://github.com/SAP/ui5-webcomponents/issues/10051)) ([73f82ab](https://github.com/SAP/ui5-webcomponents/commit/73f82abe5e9a61d88919f4c45df9435be850eb2f))
* **ui5-form:** update to latest accessibility spec ([#10152](https://github.com/SAP/ui5-webcomponents/issues/10152)) ([4382d4e](https://github.com/SAP/ui5-webcomponents/commit/4382d4e280ffcf01a924163b9b719887c17f529a)), closes [#9952](https://github.com/SAP/ui5-webcomponents/issues/9952)
* **ui5-list, ui5-tree:** support accessible description ([#10131](https://github.com/SAP/ui5-webcomponents/issues/10131)) ([45f0ffe](https://github.com/SAP/ui5-webcomponents/commit/45f0ffeafb2da0ffcaf425649c7440b604e359a3)), closes [#6445](https://github.com/SAP/ui5-webcomponents/issues/6445)
* **ui5-tokenizer:** enable multiline mode ([#9964](https://github.com/SAP/ui5-webcomponents/issues/9964)) ([1071746](https://github.com/SAP/ui5-webcomponents/commit/107174616b5b3b96c174160488eba18b9cdb9cae))





## [2.4.1-rc.0](https://github.com/SAP/ui5-webcomponents/compare/v2.4.0...v2.4.1-rc.0) (2024-11-07)


### Bug Fixes

* **ui5-menu:** make close event non-bubbling ([#10133](https://github.com/SAP/ui5-webcomponents/issues/10133)) ([e7ccce9](https://github.com/SAP/ui5-webcomponents/commit/e7ccce968cab25a07837c41f36d94603c31e007e)), closes [#10041](https://github.com/SAP/ui5-webcomponents/issues/10041)
* **ui5-select:** add support for Vue.js v-model ([#10149](https://github.com/SAP/ui5-webcomponents/issues/10149)) ([14947a7](https://github.com/SAP/ui5-webcomponents/commit/14947a7bbcf3272f56888bb466696784095b574f)), closes [#9971](https://github.com/SAP/ui5-webcomponents/issues/9971)





# [2.4.0](https://github.com/SAP/ui5-webcomponents/compare/v2.4.0-rc.4...v2.4.0) (2024-11-03)


### Bug Fixes

* **ui5-dynamic-page:** improve scrolling smoothness ([#10093](https://github.com/SAP/ui5-webcomponents/issues/10093)) ([d1420b0](https://github.com/SAP/ui5-webcomponents/commit/d1420b0be2c40ca649503cca0715e4c529929f8f)), closes [#10011](https://github.com/SAP/ui5-webcomponents/issues/10011)
* **ui5-dynamic-page:** prevent unwanted header toggle from scroll ([#10007](https://github.com/SAP/ui5-webcomponents/issues/10007)) ([7a7d00c](https://github.com/SAP/ui5-webcomponents/commit/7a7d00c0d615283d1a86d775b6c51db7feadfb42))
* **ui5-media-gallery:** clear selected thumbnail on item removal ([#10087](https://github.com/SAP/ui5-webcomponents/issues/10087)) ([af4cadb](https://github.com/SAP/ui5-webcomponents/commit/af4cadbfb637c1a6440aa0bd1fc516629ae332ae))
* **ui5-toolbar-*:** ensure getDomRef() returns the actual DOM reference ([#10009](https://github.com/SAP/ui5-webcomponents/issues/10009)) ([747244d](https://github.com/SAP/ui5-webcomponents/commit/747244d93fee5ee0d1ac54863de5e3573f4d6248))


### Features

* **ui5-date-picker:** introduce open and close events ([#10118](https://github.com/SAP/ui5-webcomponents/issues/10118)) ([819730a](https://github.com/SAP/ui5-webcomponents/commit/819730afbec336ad04e1207b8fee24bcd69f7c2d))





# [2.4.0-rc.4](https://github.com/SAP/ui5-webcomponents/compare/v2.4.0-rc.3...v2.4.0-rc.4) (2024-10-31)


Expand Down
26 changes: 18 additions & 8 deletions docs/08-Releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ and produce the following type of releases:

- **Patch releases**

Includes backward compatible bug fixes and increments the third digit, e.g. 1.0.1.
Includes backward compatible bug fixes and increments the third digit, e.g. 2.0.1.


- **Minor releases**

Includes backward compatible new features and increments the middle digit and resets the last digit to zero, e.g. 1.1.0.
Includes backward compatible new features and increments the middle digit and resets the last digit to zero, e.g. 2.1.0, 2.2.0, 2.3.0, etc.


- **Major releases**
Expand All @@ -26,20 +26,30 @@ Includes changes that break backward compatibility and increments the first digi
Here is the established release process of UI5 Web Components:


- **Monthly Stable Releases** - 1.11.0, 1.12.0....1.18.0
### Version 2

Every start of the month, a new minor version is released, which we consider stable and recommended for consumers.
Check the [Release Timelines](https://github.com/SAP/ui5-webcomponents/projects?type=classic) for up-to-date information (the related content is at the bottom of the page).
The UI5 Web Components version 2 is the latest major and recommended for usage.

- **Weekly Preview Releases** - 1.13.0-rc.0, 1.13.0-rc.1, 1.13.0-rc.2 (preview of 1.13)
- **Monthly Stable Releases** - 2.1.0, 2.2.0....2.x.0.

Every start of the month, a new minor version is released - stable and recommended for consumers.
Check the [Release Timelines](https://github.com/orgs/SAP/projects/91?pane=info) for up-to-date information (the related content is at the bottom of the page).

- **Weekly Preview Releases** - 2.x.0-rc.0, 2.x.0-rc.1....2.x.0-rc.z.

Every week on Thursday, a new release candidate version is released, considered a preview of the upcoming minor version.
It's more up-to-date with the latest development and it's useful for consumers that would like to get frequent updates and test upcoming features in the minor version.


- **On-demand Patch Releases** - 1.13.1, 1.13.2, 1.13.3
- **On-demand Patch Releases** - 2.x.1, 2.x.2....2.x.y.

Patches are released on-demand for high-priority issues.

### Version 1

The UI5 Web Components version 1 is in maintenance until 30 June 2025.

- **Monthly Patch Releases** - 1.24.1, 1.24.2....1.24.y.

Every start of the month, a new patch of 1.24 version is released - stable and recommended for consumers that still rely on version 1.

**Note:** The changelog of all releases can be found on the [GitHub Release](https://github.com/SAP/ui5-webcomponents/releases) page.
35 changes: 35 additions & 0 deletions docs/1-getting-started/01-first-steps.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,38 @@ dist/assets/vendor.c05c7785.js 114.92kb / brotli: 24.30kb
The content of the `dist` folder is ready to be deployed for productive usage. The hashes in the file names make them safe for caching and the produced bundle is optimized for production.

#### 4. Enjoy UI5 Web Components.

### Code Completion

#### Visual Studio Code (VS Code)

UI5 Web Components packages include a vscode.html-custom-data.json file that describes their custom elements. This enables advanced code completion features, such as “code hinting” or “IntelliSense,” in Visual Studio Code.

Steps to Enable Code Completion in VS Code:

1. Install UI5 Web Components locally
Use your package manager to add the required UI5 Web Components packages to your project.

2. Create or update `.vscode/settings.json`:
- Ensure a folder named `.vscode` exists at the root of your project.
- Inside `.vscode`, create or update a file named `settings.json`.

3. Configure the Settings File:
Add the following configuration to `settings.json`:

```json
{
"html.customData": [
"./node_modules/@ui5/webcomponents/dist/vscode.html-custom-data.json"
// Add entries for other installed @ui5/webcomponents packages as needed
]
}
```

If `settings.json` already exists, append the `html.customData` property to the root object.

4. Restart VS Code:
Restart the editor to apply the changes.

#### JetBrains IDEs
For JetBrains IDEs, such as WebStorm or IntelliJ IDEA, no additional setup is required when using UI5 Web Components installed from your package manager. The IDE will automatically detect the `web-types.json` file provided by the packages, enabling code completion and displaying relevant component information without further configuration.
Loading

0 comments on commit b708ede

Please sign in to comment.