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

Edit-Many Modal (with drafts): "draft" action button in the wrong order and style (compared to Edit-Collection-View) #9045

Closed
abernh opened this issue Nov 6, 2024 · 3 comments · Fixed by #9047
Assignees
Labels
status: verified If an issue has been reproduced v2

Comments

@abernh
Copy link
Contributor

abernh commented Nov 6, 2024

Link to reproduction

No response

Describe the Bug

The issue

If "drafts" are enabled the "draft" action button is rendered on the

  • edit-many-modal: as a "primary" button, on the right side of the "publish" button

Image

  • edit-collection view: as a "secondary" button, to the left of the "publish" button

Image

--> This is inconsistent and can lead to user mistakes pushing the wrong button because muscle-memory+human-brains

Expected

The "draft" action button on the edit-many-modal should have the same order and style as on the default edit-collection view.
Meaning: it should come first and be styled as a "secondary" button.

Todo

I pushed PR #9046 which adjusts the order and the style of the draft button to be consistent with the default edit-collection view.

v3

I'm fixing this primarily for our v2 based backend.
But I also pushed a PR for the beta in #9047

To Reproduce

  1. setup
  • basic config + "versions.drafts = true"
  • add a collection with an item
  1. steps
  • in admin UI
  • open collection table view in 2 tabs
    • tab1: open item directly in "edit" view
    • tab2: select item, press "edit" action button (for edit-many modal to open)

Compare "edit many" modal with "edit collection item" view.

Payload Version

2.30.3 / 3.0.0-beta.124

Adapters and Plugins

No response

@abernh abernh added status: needs-triage Possible bug which hasn't been reproduced yet v2 labels Nov 6, 2024
abernh added a commit to abernh/payload that referenced this issue Nov 6, 2024
abernh added a commit to abernh/payload that referenced this issue Nov 6, 2024
to be consistent with default collection edit view action buttons

rel: payloadcms#9045
@abernh
Copy link
Contributor Author

abernh commented Nov 6, 2024

Note: I adjusted the description to reflect that this is a v2 + v3/beta issue ... PRs with the necessary fix for each version were pushed.

PatrikKozak pushed a commit that referenced this issue Nov 6, 2024
PR adjusts "draft" action button order and style on the edit-many-modal
to be consistent with default collection edit view action buttons.

This is the `v3` PR version of
#9046 and fixes
#9045
@github-actions github-actions bot removed the status: needs-triage Possible bug which hasn't been reproduced yet label Nov 6, 2024
PatrikKozak added a commit that referenced this issue Nov 6, 2024
### What?

Fix for See #9045 - this PR adjusts the order and the style of the draft
button to be consistent with the default edit-collection view.

### Why?

If "drafts" are enabled the "draft" action button is rendered on the 
- edit-many-modal: as a "primary" button, on the right side of the
"publish" button
- edit-collection view: as a "secondary" button, to the left of the
"publish" button

--> This is inconsistent and can lead to user mistakes pushing the wrong
button because muscle-memory+human-brains

### How?

Adjusted `EditMany/index.tsx`
 - setting the `buttonStyle` attribute for the `SaveDraft` component 
- switching the positions of the action buttons in the `EditMany`
component

### Fix

 - Before

![image](https://github.com/user-attachments/assets/f20ea03f-99a1-44d5-8402-a26d3daf9e95)

 - After

![image](https://github.com/user-attachments/assets/da556fc1-bf03-47e4-a619-202198df8be1)

---------

Co-authored-by: Patrik Kozak <[email protected]>
@PatrikKozak PatrikKozak added status: needs-triage Possible bug which hasn't been reproduced yet v3 labels Nov 6, 2024
@PatrikKozak PatrikKozak self-assigned this Nov 6, 2024
@github-actions github-actions bot removed the status: needs-triage Possible bug which hasn't been reproduced yet label Nov 6, 2024
@PatrikKozak PatrikKozak added the status: verified If an issue has been reproduced label Nov 6, 2024
Copy link
Contributor

github-actions bot commented Nov 6, 2024

🚀 This is included in version v3.0.0-beta.126

Copy link
Contributor

github-actions bot commented Nov 8, 2024

This issue has been automatically locked.
Please open a new issue if this issue persists with any additional detail.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: verified If an issue has been reproduced v2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants