Skip to content

feat(SDK): Update SDK Library and UVE search bar to Use "personaId" Key #31295

Merged
rjvelazco merged 10 commits into
mainfrom
issue-28819-sdk-update-sdk-library-to-use-personaid-key-to-main
Feb 3, 2025
Merged

feat(SDK): Update SDK Library and UVE search bar to Use "personaId" Key #31295
rjvelazco merged 10 commits into
mainfrom
issue-28819-sdk-update-sdk-library-to-use-personaid-key-to-main

Conversation

@rjvelazco

@rjvelazco rjvelazco commented Feb 3, 2025

Copy link
Copy Markdown
Member

This pull request includes several updates to the dot-ema-shell and related components in the core-web library. The primary focus is on refactoring the code to use a new constant PERSONA_KEY instead of hardcoded persona identifiers and improving the handling of query parameters.

Refactoring for PERSONA_KEY usage:

Codebase improvements:

Utility function updates:

  • Replaced createPageApiUrlWithQueryParams with buildFullPageURL in multiple test files to enhance URL handling and consistency. [1] [2] [3]

These changes ensure that the codebase is more maintainable and consistent, particularly in handling persona-related parameters and query parameters.

Video

issue-28819-sdk-update-sdk-library-to-use-personaid-key-to-main.mov

This PR fixes: #28819

@rjvelazco rjvelazco changed the title feat(SDK): Update SDK Library to Use personaId Key feat(SDK): Update SDK Library and UVE search bar to Use "personaId" Key Feb 3, 2025
@rjvelazco rjvelazco marked this pull request as ready for review February 3, 2025 15:14
Comment thread core-web/libs/portlets/edit-ema/portlet/src/lib/services/dot-page-api.service.ts Outdated
Comment thread core-web/libs/portlets/edit-ema/portlet/src/lib/utils/index.ts Outdated
@rjvelazco rjvelazco requested a review from fmontes February 3, 2025 17:42
…-to-main' of https://github.com/dotCMS/core into issue-28819-sdk-update-sdk-library-to-use-personaid-key-to-main
@rjvelazco rjvelazco requested a review from zJaaal February 3, 2025 18:32
@rjvelazco rjvelazco enabled auto-merge February 3, 2025 20:08
@rjvelazco rjvelazco added this pull request to the merge queue Feb 3, 2025
Merged via the queue into main with commit 1edbc7c Feb 3, 2025
@rjvelazco rjvelazco deleted the issue-28819-sdk-update-sdk-library-to-use-personaid-key-to-main branch February 3, 2025 22:34
spbolton pushed a commit that referenced this pull request Jun 20, 2025
…ey (#31295)

This pull request includes several updates to the `dot-ema-shell` and
related components in the `core-web` library. The primary focus is on
refactoring the code to use a new constant `PERSONA_KEY` instead of
hardcoded persona identifiers and improving the handling of query
parameters.

### Refactoring for `PERSONA_KEY` usage:
*
[`dot-ema-shell.component.spec.ts`](diffhunk://#diff-8843e3a4ce8c16e83408b1a6dcc3ad54eaddd17f8e986bbdb502e11bd4446ab4L49-R49):
Replaced hardcoded persona identifiers with `PERSONA_KEY` in multiple
test cases.
[[1]](diffhunk://#diff-8843e3a4ce8c16e83408b1a6dcc3ad54eaddd17f8e986bbdb502e11bd4446ab4L49-R49)
[[2]](diffhunk://#diff-8843e3a4ce8c16e83408b1a6dcc3ad54eaddd17f8e986bbdb502e11bd4446ab4L118-R118)
[[3]](diffhunk://#diff-8843e3a4ce8c16e83408b1a6dcc3ad54eaddd17f8e986bbdb502e11bd4446ab4L333-R333)
[[4]](diffhunk://#diff-8843e3a4ce8c16e83408b1a6dcc3ad54eaddd17f8e986bbdb502e11bd4446ab4L358-R358)
[[5]](diffhunk://#diff-8843e3a4ce8c16e83408b1a6dcc3ad54eaddd17f8e986bbdb502e11bd4446ab4L379-R379)
[[6]](diffhunk://#diff-8843e3a4ce8c16e83408b1a6dcc3ad54eaddd17f8e986bbdb502e11bd4446ab4L480-R480)
[[7]](diffhunk://#diff-8843e3a4ce8c16e83408b1a6dcc3ad54eaddd17f8e986bbdb502e11bd4446ab4L533-R559)
[[8]](diffhunk://#diff-8843e3a4ce8c16e83408b1a6dcc3ad54eaddd17f8e986bbdb502e11bd4446ab4L839-R847)
*
[`dot-uve-toolbar.component.spec.ts`](diffhunk://#diff-3eaa147616a5d1ff374a5fa27b0f38f0159a9039ef7e8d672dec43631f48a9e1L40-L50):
Updated tests to use `PERSONA_KEY` for persona-related parameters.
[[1]](diffhunk://#diff-3eaa147616a5d1ff374a5fa27b0f38f0159a9039ef7e8d672dec43631f48a9e1L40-L50)
[[2]](diffhunk://#diff-3eaa147616a5d1ff374a5fa27b0f38f0159a9039ef7e8d672dec43631f48a9e1L474-R474)
*
[`edit-ema-editor.component.spec.ts`](diffhunk://#diff-34ddc5fbacaf04b962f2037385ed284310d5faf35ba409d5705b2caadd5d796aL399-R399):
Modified tests to replace hardcoded persona identifiers with
`PERSONA_KEY`.
[[1]](diffhunk://#diff-34ddc5fbacaf04b962f2037385ed284310d5faf35ba409d5705b2caadd5d796aL399-R399)
[[2]](diffhunk://#diff-34ddc5fbacaf04b962f2037385ed284310d5faf35ba409d5705b2caadd5d796aL445-R445)
[[3]](diffhunk://#diff-34ddc5fbacaf04b962f2037385ed284310d5faf35ba409d5705b2caadd5d796aL467-R467)

### Codebase improvements:
*
[`dot-ema-shell.component.ts`](diffhunk://#diff-677330662fea6dadc7e48fd8455ec2a6fe60d624c7ed1f01f0a3e985aacd05c6R40):
Introduced the `normalizeQueryParams` utility function to streamline
query parameter handling and ensure consistency.
[[1]](diffhunk://#diff-677330662fea6dadc7e48fd8455ec2a6fe60d624c7ed1f01f0a3e985aacd05c6R40)
[[2]](diffhunk://#diff-677330662fea6dadc7e48fd8455ec2a6fe60d624c7ed1f01f0a3e985aacd05c6L104-L121)
*
[`dot-uve-toolbar.component.ts`](diffhunk://#diff-217a9e619d6590c4f652e85353b9637ba5e464ddeb0424be35aef39bb8dceb30L201-R232):
Refactored the `onPersonaSelected` method to use `PERSONA_KEY` and
improved the confirmation dialog logic for persona selection.
[[1]](diffhunk://#diff-217a9e619d6590c4f652e85353b9637ba5e464ddeb0424be35aef39bb8dceb30L201-R232)
[[2]](diffhunk://#diff-217a9e619d6590c4f652e85353b9637ba5e464ddeb0424be35aef39bb8dceb30L268-R268)

### Utility function updates:
* Replaced `createPageApiUrlWithQueryParams` with `buildFullPageURL` in
multiple test files to enhance URL handling and consistency.
[[1]](diffhunk://#diff-652f846aa914e51df03471614a9ffc9b80757f275a3639fe1131def21c40b39dL23-R23)
[[2]](diffhunk://#diff-652f846aa914e51df03471614a9ffc9b80757f275a3639fe1131def21c40b39dL33-R33)
[[3]](diffhunk://#diff-3eaa147616a5d1ff374a5fa27b0f38f0159a9039ef7e8d672dec43631f48a9e1L59-R59)

These changes ensure that the codebase is more maintainable and
consistent, particularly in handling persona-related parameters and
query parameters.

### Video


https://github.com/user-attachments/assets/df074781-d62f-4c5a-993a-3363e17109e2
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.

SDK: Update SDK Library and UVE search bar to Use "personaId" Key

4 participants