- Issue created by @Greg Boggs
- π²π¦Morocco akram zairig Rabat, Morocco
Hi Greg, yes itβs good idea
Iβm interested on merging dynamic_breadcrumb on easy_breadcrumb - πΊπΈUnited States Greg Boggs Portland Oregon
Awesome. Since Dynamic crumbs uses breadcrumb alter and Easy Breadcrumb doesn't, we should be able to just copy and paste the code into EB and then just test to make sure everything works together nicely.
- πΊπΈUnited States Greg Boggs Portland Oregon
I've added you both with full permissions on Easy Breadcrumb.
- π«π·France berramou
Thank you Greg,
Okay i will try this when i have some time.
I guess we still need to add the config of dynamic breadcrumbs to the EB form, like the both modules will have the configuration in the same place. - πΊπΈUnited States Greg Boggs Portland Oregon
Sounds like a plan. I will work on it as well when I can.
- π«π·France berramou
I just pushed first version of the merge in this branch
here is a draft MR https://git.drupalcode.org/project/easy_breadcrumb/-/merge_requests/99Todo:
- Maybe an Ajax button to update fieldSets of config when user check other entities
- Move code from hook_system_breadcrumb_alter to EasyBreadcrumbBuilder, we need to adapt applies and build methods
- Test that all features works together
- Maybe rename configuration naming (value and checkbox not so clear)
- Maybe add hook_update for people who has already the Dynamic breadcrumbs or block users to update to version that have already Dynamic breadcrumbs merged, and tell them to disable it and just update easy breadcrumbs it has already the DB
- π«π·France berramou
Number 2 is fixed here https://git.drupalcode.org/project/easy_breadcrumb/-/merge_requests/99/d...
I moved the code from the hook to the class maybe need some optimisations.
I let you review the MR. - π«π·France berramou
I fixed Drupal CS and i added a hook to give developer the possibility to add their own route, this hook is useful when you have custom entities
https://git.drupalcode.org/project/easy_breadcrumb/-/blob/feature/megre_...I hesitate about the alter maybe we don't need to give the possibility to alter allowed routes, maybe someone don't want dynamic breadcrumbs to be applied on taxonomy routes, but they can do it in configuration just donc check Taxonomy term entity type.
Anyway when you have time you can review the the MR. - πΊπΈUnited States Greg Boggs Portland Oregon
Wow, code looks great! Adding extra hooks doesn't hurt, gives programmers the options to write custom code if they want to.
I think once we test everything, we're almost ready to merge.
There's some phpunit test fails we need to update first:
Drupal\Core\Config\Schema\SchemaIncompleteException: Schema errors for easy_breadcrumb.settings with the following errors: easy_breadcrumb.settings:entity_types missing schema
- π«π·France berramou
Yes, you are right adding extra hooks always good π, itself good, the hook to add more allowed routes is mandatory otherwise the custom entities even if the dynamic breadcrumbs configured it will not work because it will not pass the if condition.
I was wondering just about the hook alter if it has really a value.Phpunit tests should be fixed, and do more testing of the features, i did test but not all the cases.
- πΊπΈUnited States Greg Boggs Portland Oregon
I got you now. I think it has value. In fact, I was thinking tonight of making the routes a configuration item to make them customizable after someone made a new builder to customize crumbs on a single route:
https://www.drupal.org/project/easy_breadcrumb/issues/3424369 π¬ Node with multiple taxonomies - can I pass value as URL param Active
- π«π·France berramou
Yes, it's a good idea to give user the ability to config or alter routes where they want to apply the builder.
I created this issue π Due to the merge into Easy Breadcrumbs add hook_install Active to prevent both modules be installed in the same time after the merge. - π«π·France berramou
I just committed https://git.drupalcode.org/project/dynamic_breadcrumb/-/commit/42220efd8...
I assumed that the merger will be in the next release 2.0.7, if it's not the case, we can change the version later just before create the new release of DB.Still have hook update in the release of merge if the DB already installed, we should migrate the config to EB and uninstall DB module.
- πΊπΈUnited States Greg Boggs Portland Oregon
wow, super smart, didn't think of that.
- π«π·France berramou
I just pushed a commit to add hook update and into hook_install if the module DB installed migrate it's configuration and uninstall it
https://git.drupalcode.org/project/easy_breadcrumb/-/merge_requests/99/d... - π«π·France berramou
I just fixed the conflicts and update the code in feature/megre_dynamic-breadcrumbs branch
@Greg Boggs Let me know when you have time to look at the MR. - πΊπΈUnited States Greg Boggs Portland Oregon
I'll get it taken care of this week.
- π©πͺGermany spuky
@berramou can you bring up your MR to the latest dev Version... I guess the 3 failing unit tests should be fixed then... because those where in the main codebase
- π«π·France berramou
Thank you @spuky yes it fixed the 3 failing unit tests.
@Greg Boggs if you have some time to review the MR, and maybe add more tests for dynamic breadcrumb ? - Status changed to Needs review
4 months ago 9:31pm 7 August 2024 - π©πͺGermany spuky
@berramou you might want to open an issue in the EB issue queue. And attach your MR there so it gets more eyeballs and also it might be easier for folks to try it out. By just adding the diff as a patch to a composer.json. It is still on my todo list... to check it out closer... but i did not get around doing it.. noticed it has an merge conflict with the latest dev version...
- π«π·France berramou
Thank you @spuky, i created an issue β¨ Merge Dynamic breadcrumb Active