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

Enhancement: Toggle add file button on single file field #7315

Conversation

heybran
Copy link
Contributor

@heybran heybran commented Jun 21, 2024

Description

On file field, if it's a single file field (file_limit equals to 1), once an file has been added, we can hide the Add file button, once this file is deleted, then the button will show again, so the original situation reported on the issue can be fixed.

Related GitHub issue(s)

#7120

Testing instructions

  1. Create a single file field
  2. Go to post type
  3. First you will see the Add file button
  4. Add a file then Add file button will be hidden
  5. Once file is deleted, Add file button will be shown again

Screenshots / screencast

Screen.Recording.2024-06-21.at.12.40.11.mov

Changelog text for these changes

Enhancement: Single file field now have better user experience. (@heybran)

PR checklist

@sc0ttkclark sc0ttkclark merged commit 9171ecb into pods-framework:release/3.2.7 Aug 27, 2024
1 of 3 checks passed
Copy link

what-the-diff bot commented Aug 27, 2024

PR Summary

  • Update to meta-information
    There was an update done to the pods-dfv.min.asset.json file which is basically a settings file. This included a change to the version number, ensuring that we are working with the most recent version of the codebase.

  • Functional changes in the marionette-adapter.js file
    Some new functionality was added to the marionette-adapter.js file which is a part of our infrastructure code. There are two main updates here:

    • A new setting/option was introduced called allowSingleFile. This will provide more flexibility in the way our code behaves, by letting it control whether it should allow only one file or multiple files.
    • Based on this new allowSingleFile setting, a new feature has been added that affects the visual structure of our webpage. If a single file is allowed, it attaches a new label called pods-marionette-adapter-wrapper-single-file to this section of the webpage to denote this allowed functionality.
  • Styling changes
    A visual tweak has been done to the part of our website where we list some items. Specifically, if a listed item (indicated by .pinkynail class, a technical term we use in the styling code) is present in a certain section (wrapper div), then an 'Add' button (the .pods-dfv-list-add element) will be hidden. Updating the styling in this way can help improve the interface of our website and make it more intuitive for users.

@sc0ttkclark sc0ttkclark added this to the Pods 3.2.7 milestone Aug 27, 2024
@sc0ttkclark sc0ttkclark added the Component: UI Issues related to user experience and interfaces label Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: UI Issues related to user experience and interfaces
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants