[PAGES-989] Remove UniqueNameGenerator from Pages codebase and use the one from Norsu project Created: 06/Jan/23  Updated: 01/Feb/23

Status: Open
Project: Magnolia pages module
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Adam Siska Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Σ Remaining Estimate: Not Specified Remaining Estimate: Not Specified
Σ Time Spent: Not Specified Time Spent: Not Specified
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Sub-Tasks:
Key
Summary
Type
Status
Assignee
PAGES-990 Implementation Sub-task To Do  
PAGES-991 Review Sub-task To Do  
PAGES-992 Pre-Integration QA Sub-task To Do  
PAGES-993 QA Sub-task To Do  
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Epic Link: AuthorX Maintenance
Team: AuthorX

 Description   

As we needed the unique name generating logic at two places in Norsu project, we moved implementation of the util from Pages project to Norsu.

https://git.magnolia-cms.com/projects/MODULES/repos/pages/browse/magnolia-pages-norsu-app/src/main/java/info/magnolia/pages/norsu/app/util/UniqueNameGenerator.java?at=refs%2Fheads%2Ffeature%2FpagesVersion-6.3-norsu-SNAPSHOT

https://git.magnolia-cms.com/projects/CLOUD/repos/norsu/pull-requests/299/commits/b5ab1d631dfe949924fa9f9a7ac0c77f400b2ab9#ui-framework-integration/src/main/java/info/magnolia/norsu/ui/util/UniqueNameGenerator.java

So please remove the original one from Pages project and use the Norsu one.
Additionaly the logic was slightly updated to be in par with current behaviour, i.e. if the baseName node is not in place, we use the name without prefix instead of adding 0 prefix always.

E.g.
baseName, baseName0, baseName1, ...
instead of
baseName0, baseName1, baseName2, ...

If this would cause troubles with current implementation/usages please inform us to change the behaviour back..


Generated at Mon Feb 12 06:24:04 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.