I love the feature to set breadcrumb by tokens. Any interest in merging this into https://www.drupal.org/project/easy_breadcrumb? I'd be excited to add y'all as maintainers.
I love the feature to set breadcrumb by tokens. Any interest in merging this into https://www.drupal.org/project/easy_breadcrumb? I'd be excited to add y'all as maintainers.
Comments
Comment #2
greg boggsComment #3
akram zairig commentedHi Greg, yes it’s good idea
I’m interested on merging dynamic_breadcrumb on easy_breadcrumb
Comment #4
berramou commented+1 for the merge.
Comment #5
greg boggsAwesome. 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.
Comment #6
greg boggsI've added you both with full permissions on Easy Breadcrumb.
Comment #7
berramou commentedThank 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.
Comment #8
greg boggsSounds like a plan. I will work on it as well when I can.
Comment #9
berramou commentedI just pushed first version of the merge in this branch
here is a draft MR https://git.drupalcode.org/project/easy_breadcrumb/-/merge_requests/99
Todo:
Comment #10
berramou commentedNumber 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.
Todo:
Move code from hook_system_breadcrumb_alter to EasyBreadcrumbBuilder, we need to adapt applies and build methodsComment #11
berramou commentedI 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.
Comment #12
greg boggsWow, 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
Comment #13
berramou commentedYes, 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.
Comment #14
greg boggsI 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
Comment #15
berramou commentedYes, 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 #3425983: Due to the merge into Easy Breadcrumbs add hook_install to prevent both modules be installed in the same time after the merge.
Comment #16
berramou commentedComment #17
berramou commentedI 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 to add hook update in the release of merge if the DB already installed, we should migrate the config to EB and uninstall DB module.
Comment #18
greg boggswow, super smart, didn't think of that.
Comment #19
berramou commentedI 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...
Comment #20
berramou commentedI 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.
Comment #21
greg boggsI'll get it taken care of this week.
Comment #22
berramou commentedI tried to fix unit tests this commit, but still 3 errors to fix, and maybe add other tests for dynamic breadcrumbs.
Comment #23
spuky commented@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
Comment #24
berramou commentedThank 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 ?
Comment #25
berramou commentedComment #26
spuky commented@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...
Comment #27
berramou commentedComment #28
berramou commentedThank you @spuky, i created an issue #3467372: Merge Dynamic breadcrumb