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

[2.0] Rename bundle to type and deprecate functions/permissions that use bundle. #23

Open
laryn opened this issue Nov 14, 2018 · 8 comments
Labels
2.0 Paragraphs 2.0 specific issue

Comments

@laryn
Copy link
Member

laryn commented Nov 14, 2018

EDIT/CLEAN UP:

The term "bundle" has been changed in front-facing places but it remains to clean up the code (function names, permission names, etc.) and deprecate the old "bundle" versions in the same way Backdrop core:

  • provide a wrapper where paragraphs_bundle_load calls call paragraphs_type_load and mark paragraphs_bundle_load as deprecated
@laryn
Copy link
Member Author

laryn commented Nov 26, 2018

Work in progress locally (will push this week hopefully) but noting here that the label/machine name column(s) should track whatever is decided here, probably (for consistency):

backdrop/backdrop-issues#3395

@laryn
Copy link
Member Author

laryn commented Nov 29, 2018

Just pushed these commits in a new branch for testing. @herbdool do you use Paragraphs? Would you be willing to help me test?

screenshot from 2018-11-29 09-30-44

@herbdool
Copy link
Contributor

@laryn sadly I'm not using Paragraphs. If you can't find anyone to help test I'll try to find some time in the near future.

@serundeputy
Copy link
Member

serundeputy commented Dec 19, 2018

@laryn In general I'm for this idea as it brings them in parallel with nodes and entities that have types. 👍

The current PR seems to be addressing the UI references to bundles in favour of type 👍

I think this might lead to some less than ideal Developer Experiences [DX] though; 👎

For example the function paragraphs_bundle_load should probably be renamed to paragraphs_type_load to be brought semantically inline with (what I think is the spirit of this issue), but that would be an API change, so folks coming from D7 paragraphs could have potentially breaking change here.

That leaves a couple of options here;

  • proceed with just the UI updates as in the current PR and level down the DX and possibly cause confusion
  • push the change off to 2.x paragraphs where api changes are allowed
  • provide a wrapper where paragraphs_bundle_load calls call paragraphs_type_load and mark paragraphs_bundle_load as deprecated

Not sure what is the best way to go ???? the third option is probably best, but also the hardest.

@klonos
Copy link
Member

klonos commented Dec 19, 2018

provide a wrapper where paragraphs_bundle_load calls call paragraphs_type_load and mark paragraphs_bundle_load as deprecated

^^ that's what we've been doing in core. I think that this is the best option.

@laryn
Copy link
Member Author

laryn commented Dec 19, 2018

@serundeputy @klonos I can probably be convinced. I was leaving it as is (just changing the UI) for the moment in the hopes that any potential future updates from the D7 module would apply more cleanly. Maybe I don't need to worry about that.

@robertgarrigos
Copy link
Member

I was trying this issue-23 branch and got an error when creating a new paragraph type:

Warning: Creating default object from empty value a paragraphs_admin_bundle_form_submit() (línia 225 de /app/www/modules/contrib/paragraphs/paragraphs.admin.inc).

@laryn
Copy link
Member Author

laryn commented May 10, 2019

Status: I think I'm going to leave Backdrop Paragraphs 1.x-1.x more or less as it is on Drupal 7 and begin these changes in Paragraphs 1.x-2.x. (I don't envision D7 Paragraphs getting a lot of attention and massive changes, but these updates will make a lot of changes to the Backdrop version.) Also planning to follow the third option listed by @serundeputy and thumbed up by @klonos.

@laryn laryn changed the title Adjust paragraph bundles to track Drupal 8 [2.0] Rename bundle to type and add icon/description to Paragraph types May 10, 2019
@laryn laryn added the 2.0 Paragraphs 2.0 specific issue label May 10, 2019
laryn added a commit that referenced this issue May 10, 2019
laryn added a commit that referenced this issue May 10, 2019
laryn added a commit that referenced this issue May 10, 2019
@laryn laryn changed the title [2.0] Rename bundle to type and add icon/description to Paragraph types [2.0] Rename bundle to type and deprecate functions/permissions that use bundle. Aug 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.0 Paragraphs 2.0 specific issue
Projects
None yet
Development

No branches or pull requests

5 participants