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

Feature/979 copy field values #12436

Closed
wants to merge 39 commits into from
Closed

Conversation

i-just
Copy link
Contributor

@i-just i-just commented Dec 9, 2022

Description

On the entry/category edit page (elements that support autosaving drafts):

  • implemented a new button that allows you to copy all translatable field values from the selected site;
  • translatable field icon now triggers a HUD, which contains a form that allows you to copy just that field’s value from the selected site;
  • copy action is applied to the top-level fields (e.g. entire matrix field)
  • plugins need to implement CopyableFieldInterface to use this feature

TODO:

  • switch the sites selector in the copy form (in the hud) to a disclosure menu

IMPORTANT: once this feature is released, an update to craftcms/html-field needs to be released; PR 6

Related issues

DEV-979

@i-just i-just changed the base branch from develop to 4.4 December 9, 2022 13:40
@i-just i-just changed the title Feature/979 copy field values v1 Feature/979 copy field values Dec 9, 2022
brandonkelly and others added 4 commits January 11, 2023 08:41
# Conflicts:
#	src/controllers/ElementsController.php
#	src/web/assets/cp/dist/cp.js
#	src/web/assets/cp/dist/cp.js.map
#	src/web/assets/cp/dist/css/cp.css
#	src/web/assets/cp/dist/css/cp.css.map
#	src/web/assets/cp/src/js/ElementEditor.js
@i-just i-just changed the base branch from 4.4 to 4.5 April 12, 2023 12:40
@i-just
Copy link
Contributor Author

i-just commented Apr 12, 2023

@brandonkelly as per our chat yesterday, 4.5 is merged into this, conflicts resolved (not many) and tested that it still works like it did in December. Please LMK if you have any questions or if it still doesn’t want to work for you.

@benjamindavid
Copy link
Contributor

benjamindavid commented Jul 18, 2023

I’m sorry if these things have already been discussed or ruled out, but here’s some feedback on this:

  • Explain somewhere that only translatable fields will be copied.
  • If there’s no translatable fields, or if copying won’t change anything, the copy button could be disabled or invisible
  • Add a blue flash for fields that have been copied and currently visible
  • The top area of the page is already a bit crowded with buttons, maybe we could try to find a shorter label for the copy button. Longer term we could clean up that UI with a three dot menu or something like that?
image

@i-just i-just changed the base branch from 4.5 to 5.0 October 13, 2023 13:38
@i-just i-just requested review from benjamindavid and removed request for a team, timkelty, nfourtythree and benjamindavid October 13, 2023 13:39
@i-just i-just marked this pull request as draft October 13, 2023 13:52
@i-just
Copy link
Contributor Author

i-just commented Oct 13, 2023

Targeting the 5.0 branch now.
I’m putting it back into draft to work on minor compatibility changes & to test.

@brianjhanson
Copy link
Contributor

Closing in favor of #14056

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.

None yet

4 participants