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

ACAS-834: Provide appropriate inputs for bulk loader default values #1203

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

bffrost
Copy link
Collaborator

@bffrost bffrost commented Mar 4, 2025

Description

The original ticket was narrowly scoped to provide a date picker when entering the lot date synthesized. I did that, and then extended it to also provide dropdowns for any fields that have constrained possible values / data dictionaries.

Related Issue

https://schrodinger.atlassian.net/browse/ACAS-834

How Has This Been Tested?

Tested locally:

  • Changing dbProperty back and forth between normal, dropdown, and date type parameters
  • Submitting the form for validation and inspecting the request to confirm all types get the defaultValue inserted
  • Tested creating a template, and how the form renders when a premade template is selected and then the file is loaded.

Screenshots / Videos

Dropdown:
Screenshot 2025-03-04 at 11 18 27 AM

Date picker:
Screenshot 2025-03-04 at 11 18 36 AM

Known Issues

  • Many of the cmpdreg routes don't support searching by labelText so they don't update when a user types into the select2 search box. @brianbolt do you know if we have a feature to do frontend filtering of options rather than backend?

Copy link
Contributor

@dalejerikson dalejerikson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Looks nice! :)

@brianbolt
Copy link
Contributor

Many of the cmpdreg routes don't support searching by labelText so they don't update when a user types into the select2 search box. @brianbolt do you know if we have a feature to do frontend filtering of options rather than backend?

I see what you mean when playing around with the project select list. Typing doesn't seem to change anything and is basically broken. In my testing, getting this if block to return false does the trick:

So I think it would be as easy as adding an option that skips the select2Options.ajax function creation if provided.

Copy link
Contributor

@brianbolt brianbolt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with a small nit but I do think its worth adding the fix for the select2 widget type ahead so I'm requesting changes.

@bffrost
Copy link
Collaborator Author

bffrost commented Mar 10, 2025

Many of the cmpdreg routes don't support searching by labelText so they don't update when a user types into the select2 search box. @brianbolt do you know if we have a feature to do frontend filtering of options rather than backend?

I see what you mean when playing around with the project select list. Typing doesn't seem to change anything and is basically broken. In my testing, getting this if block to return false does the trick:

So I think it would be as easy as adding an option that skips the select2Options.ajax function creation if provided.

Thanks for this @brianbolt . I've added a backendSearch option that can be set to false to bypass that ajax function creation, and it works great:
Screenshot 2025-03-10 at 2 03 48 PM

@bffrost bffrost requested a review from brianbolt March 10, 2025 21:05
Copy link
Contributor

@brianbolt brianbolt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice LGTM

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.

3 participants