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

feat(FTM): New UVE Toolbar - Implement "API" button #30830

Merged

Conversation

rjvelazco
Copy link
Contributor

@rjvelazco rjvelazco commented Dec 3, 2024

This pull request includes several changes to the DotUveToolbarComponent and related files to enhance the functionality and testing of the API URL link. The most important changes include updating the toolbar component to use an anchor tag for the API URL link, adding a computed property for the API URL, and enhancing the tests to verify the correct behavior of the API URL link.

Changes to DotUveToolbarComponent:

  • Updated the toolbar component to use an anchor (<a>) tag instead of a button for the API URL link, and added attributes such as title, target, and href to improve accessibility and functionality. ([core-web/libs/portlets/edit-ema/portlet/src/lib/edit-ema-editor/components/dot-uve-toolbar/dot-uve-toolbar.component.htmlL19-R26](https://github.com/dotCMS/core/pull/30830/files#diff-9937556e73b051b878ba22ad1ce971a70019a617d7979b3e0bcc814801ad350bL19-R26))

Enhancements to testing:

  • Added a constant $apiURL and updated the DotUveToolbarComponent tests to include this constant and verify the presence and correctness of the API URL link. ([[1]](https://github.com/dotCMS/core/pull/30830/files#diff-3eaa147616a5d1ff374a5fa27b0f38f0159a9039ef7e8d672dec43631f48a9e1R38-R39), [[2]](https://github.com/dotCMS/core/pull/30830/files#diff-3eaa147616a5d1ff374a5fa27b0f38f0159a9039ef7e8d672dec43631f48a9e1R123), [[3]](https://github.com/dotCMS/core/pull/30830/files#diff-3eaa147616a5d1ff374a5fa27b0f38f0159a9039ef7e8d672dec43631f48a9e1L177-L180), [[4]](https://github.com/dotCMS/core/pull/30830/files#diff-3eaa147616a5d1ff374a5fa27b0f38f0159a9039ef7e8d672dec43631f48a9e1R195-R205))

Computed property for API URL:

  • Added a computed property $apiURL in the DotUveToolbarComponent to dynamically generate the API URL based on the page parameters. ([[1]](https://github.com/dotCMS/core/pull/30830/files#diff-217a9e619d6590c4f652e85353b9637ba5e464ddeb0424be35aef39bb8dceb30R34), [[2]](https://github.com/dotCMS/core/pull/30830/files#diff-e6d3fb6319626fa85a4fc6894b57935843713366be593de6dd1dc5ed68bf6afcR119-R127))

New test for withUVEToolbar:

  • Added a new test file withUVEToolbar.spec.ts to verify the computed property $apiURL and ensure it returns the correct API URL based on given page parameters. ([core-web/libs/portlets/edit-ema/portlet/src/lib/store/features/editor/toolbar/withUVEToolbar.spec.tsR1-R83](https://github.com/dotCMS/core/pull/30830/files#diff-7a5de702ac1dc81304f4c31816f5c0363aa56141f8afa583a87856e7a0d8482dR1-R83))

Videos

Traditional

Screen.Recording.2024-12-03.at.11.14.25.AM.mov

Headless

Screen.Recording.2024-12-03.at.11.16.02.AM.mov

This PR fixes: #30733

@rjvelazco rjvelazco linked an issue Dec 3, 2024 that may be closed by this pull request
@rjvelazco rjvelazco changed the title chore(UVE - New Toolbar): add API button feat(FTM): New UVE Toolbar - Implement "API" button Dec 3, 2024
@rjvelazco rjvelazco marked this pull request as ready for review December 3, 2024 15:12
@rjvelazco rjvelazco requested review from zJaaal, fmontes, KevinDavilaDotCMS, oidacra, nicobytes and hmoreras and removed request for zJaaal and fmontes December 3, 2024 18:11
@rjvelazco rjvelazco enabled auto-merge December 3, 2024 20:31
@rjvelazco rjvelazco added this pull request to the merge queue Dec 4, 2024
Merged via the queue into main with commit 3b866d6 Dec 4, 2024
22 checks passed
@rjvelazco rjvelazco deleted the issue-30733-ftm-new-uve-toolbar-implement-api-button branch December 4, 2024 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FTM: New UVE Toolbar - Implement "API" button
3 participants