phetsims / paper-land

Build and explore multimodal web interactives with pieces of paper!
https://phetsims.github.io/paper-land/
MIT License
19 stars 3 forks source link

Add ability to multiselect programs to copy on the Create Program dialog #65

Closed brettfiedler closed 1 year ago

brettfiedler commented 1 year ago

Copying over multiple Programs to a new Space if you want to try out a demo without breaking things requires pressing the Create Program button a lot. Let's simplify that by allowing multiselect to creating more than one new program.

I'm okay with whatever is easiest in react/bootstrap, be that Ctrl (or Shift) select or more like a checkbox toggle. Let me know what the possibilities are. Bonus points for easier keyboard accessibility.

jessegreenberg commented 1 year ago

Last time we worked on this we added this TODO:

      // The name of the space we are going to use to populate templates.
      // TODO: We want to support multiple source spaces at once, but couldn't get that working with React.
      sourceSpace: '*',

r more like a checkbox toggle. Let me know what the possibilities are

Sounds good! I think a different UI component like a list of checkboxes could be easier and more accessible.

jbphet commented 1 year ago

I'm leaving this one assigned to me for the moment because in reviewing the code with @jessegreenberg I realized that it is not waiting for the creation of one program to finish before initiating the creation of another when multiple files are selected for copying. While this may not actually be a problem, it seems prudent to enforce sequential operations here. Once that is implemented and tested, I think this will be complete.

jbphet commented 1 year ago

I have wrapped the post operation that creates the new programs in a JS Promise and tested it out, and it seems to work well. @BLFiedler - Is there anything else that you're aware of that needs to be done for this one?

brettfiedler commented 1 year ago

Worked well, no issues found to date. Closing!