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

For single file field, "Add File" should say "Replace File" and hebavior needs update accordingly #7120

Open
heybran opened this issue Jul 18, 2023 · 3 comments
Labels
Component: React Issues related to React JS Type: Bug
Milestone

Comments

@heybran
Copy link
Contributor

heybran commented Jul 18, 2023

Description

For single file field, Add File should say Replace File and hebavior needs update accordingly.

As discussed on Slack, the way it works now is that it's just attempting to add the additional file but it has hit the limit so newly added file won't be shown, we should update Add File to Replace File and update button function to replace file as well.

Version

2.9.19

Screenshots / Screencast

Screenshot 2023-07-17 at 23 08 57
@JoryHogeveen
Copy link
Member

I believe this is a field setting, you can set your own label in the field advanced options.

@sc0ttkclark
Copy link
Member

This is really tough because the file field needs a full refactor. It's currently in an in-between state because we tried to save money in our original React revamp for Pods 2.8.

It's got a Marionette adapter sitting on top of the React field and the logic is really difficult to rework.

As it stands, if we change how this works for 'Single' file fields to replace the existing value, that may be confusing since 'Multiple' file fields won't have that ability. So for 'Single', if we used 'Replace' then 'Multiple' would have a different interaction there.

@heybran
Copy link
Contributor Author

heybran commented Jun 21, 2024

Hey @sc0ttkclark

I've sent a small improvement PR for this issue: #7315, although didn't really refactor the logic to make the All file to replace original file if it's a single file field, but what I did is to hide the button when an file is being added already, so in my opinion that would be better than current behavior. What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: React Issues related to React JS Type: Bug
Projects
Status: 🆕 New
Development

No branches or pull requests

3 participants