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

Gallery icon remains in fictitious record sets made using "Browse in Forms" #4898

Open
lexiclevenger opened this issue May 8, 2024 · 3 comments · May be fixed by #4904
Open

Gallery icon remains in fictitious record sets made using "Browse in Forms" #4898

lexiclevenger opened this issue May 8, 2024 · 3 comments · May be fixed by #4904
Assignees
Labels
1 - Bug Incorrect behavior of the product 2 - Forms Issues that are related to the form system
Milestone

Comments

@lexiclevenger
Copy link
Collaborator

Describe the bug
The gallery icon was removed from fictitious record sets in the PR #4220. However, it was only removed from fictitious record sets created using the 'Add' button on an existing form, and not from those created using 'Browse in Forms' from a Query.

To Reproduce
Steps to reproduce the behavior:

  1. Use a new or existing Query to query for records
  2. Select more than one record
  3. Click 'Browse in Forms' to create a fictitious record set
  4. See gallery icon in the top right

Expected behavior
The gallery icon should be removed in order to be consistent with fictitious record sets made using the 'Add' button:
Screenshot 2024-05-08 at 4 53 05 PM

Screenshots

Screen.Recording.2024-05-08.at.5.01.27.PM.mov

Specify 7 System Information - 2024-05-08T22_03_10.639Z.txt

Please, also fill out the following information manually:

  • OS: Mac
  • Browser: Chrome
  • Specify 7 Version: edge
  • Database Name: Fitz_NHMD_Oct_2023
  • Collection name: Vertebrate Paleontology
  • User Name: petrifiedroadkill
@lexiclevenger lexiclevenger added 1 - Bug Incorrect behavior of the product 2 - Forms Issues that are related to the form system labels May 8, 2024
@CarolineDenis CarolineDenis closed this as not planned Won't fix, can't repro, duplicate, stale May 9, 2024
@grantfitzsimmons
Copy link
Member

If there are records in a fictitious record set that have attachments, why would we not show the gallery icon? It seems logical to be able to view attachments using the gallery viewer on any record within a fictitious set as long as it is not a new record.

Apologies that I was unable to respond before #4220 was merged. What do you think @CarolineDenis?

@grantfitzsimmons
Copy link
Member

Based on our discussion, what we need to do is:

  • Make the "Create new record set" icon display only

    • when all records in a fictitious record set are from the same table
    • when the record is saved (not when it is new)
  • Make the "Attachment gallery" icon display only

    • when all records in a fictitious record set are from the same table
    • when the record is saved (not when it is new)

The attachment gallery icon can show when there are no attachments in the record set, but it should only be shown under the conditions above.

@maxpatiiuk
Copy link
Member

maxpatiiuk commented May 11, 2024

when all records in a fictitious record set are from the same table

Could you please clarify when is this ever the case?
I though Specify only allowed record sets to have records from one table at a time (until we have #2627 😊)
is that something unique to fictitious record set? I didn't think so - isn't fictitious record set just a record set we create implicitly on the front-end (and later give user a choice to save it explicitly)?

or is react state getting stale when user switches from one table to another? in that case we should add the key={} prop to clear all states when table name changes

@CarolineDenis CarolineDenis modified the milestones: 7.9.x, 7.9.7 May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 - Bug Incorrect behavior of the product 2 - Forms Issues that are related to the form system
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants