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

Added multi select reorder functionality #2334

Merged
merged 17 commits into from
Apr 17, 2024

Conversation

Abhinegi2
Copy link
Contributor

@Abhinegi2 Abhinegi2 commented Apr 8, 2024

closes: #2120

Visible/Frontend Changes

  • Replaced input field for Generated Title of Record with a dropdown menu.
  • Enhanced Generated Title of Record dropdown to display available fields for any entity type.
  • Implemented drag handle feature for multi-select dropdown by using reorder flag.
  • Enabled reordering of selected values in the multi-select dropdown.

@Abhinegi2 Abhinegi2 self-assigned this Apr 8, 2024
Copy link
Contributor

github-actions bot commented Apr 8, 2024

Deployed to https://pr-2334.aam-digital.net/

@Abhinegi2 Abhinegi2 marked this pull request as ready for review April 9, 2024 09:41
@Abhinegi2 Abhinegi2 requested a review from tomwwinter April 9, 2024 09:48
Copy link
Member

@sleidig sleidig left a comment

Choose a reason for hiding this comment

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

Looks quite good already 🙂

From functional / UI testing:

  • dropdown items checkbox and text should be vertically aligned:
    image
  • should only allow string or number fields currently. Other types (schemaField.dataType) will not be displayed properly if used as "toStringAttributes

@@ -101,6 +107,8 @@ export class BasicAutocompleteComponent<O, V = O>
* Whether the user should be able to select multiple values.
*/
@Input() multi?: boolean;
@Input() reorder?: boolean;
autocompleteDraggableOptions: SelectableOption<O, V>[] = [];
Copy link
Member

Choose a reason for hiding this comment

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

can we not use the same autocompleteSuggestedOptions array also if drag&drop is availalbe?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The drop method expects an array as input to perform operations such as moving items within the array. However, autocompleteSuggestedOptions is an Observable that emits values asynchronously, and it's not directly usable as an array in the drop method. That is why I am using different arrays to drag and drop.

@Abhinegi2
Copy link
Contributor Author

Abhinegi2 commented Apr 12, 2024

Looks quite good already 🙂

From functional / UI testing:

  • dropdown items checkbox and text should be vertically aligned:

Hi @sleidig I have fixed this. Does this look fine or do we need some more modifications here?
image

@Abhinegi2 Abhinegi2 requested a review from sleidig April 12, 2024 10:35
@Abhinegi2 Abhinegi2 changed the title added multi select functionality Added multi select reorder functionality Apr 12, 2024
Copy link
Member

@sleidig sleidig left a comment

Choose a reason for hiding this comment

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

UI looks good now. Did some minor code cleanup.

One issue I still discovered: After switching tab and coming back (i.e. re-initializing the options), the order in the form field is still correct but in the dropdown it is back to original order not matching the reordered sorting anymore.
I would suggest to put all selected items at the top of the dropdown, in the order they are selected. And then drop all the remaining fields in their default order.

@Abhinegi2
Copy link
Contributor Author

UI looks good now. Did some minor code cleanup.

One issue I still discovered: After switching tab and coming back (i.e. re-initializing the options), the order in the form field is still correct but in the dropdown it is back to original order not matching the reordered sorting anymore. I would suggest to put all selected items at the top of the dropdown, in the order they are selected. And then drop all the remaining fields in their default order.

I have updated the functionality a little bit. Can you please check now that it's looking fine or do you have any suggestions?

@sleidig sleidig merged commit 4913dab into master Apr 17, 2024
6 of 7 checks passed
@sleidig sleidig deleted the feature/enable-multiselect-for-tostringattribute branch April 17, 2024 08:42
@aam-digital-ci
Copy link
Collaborator

🎉 This PR is included in version 3.35.0-master.5 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@aam-digital-ci aam-digital-ci added the released on @master managed by CI (semantic-release) label Apr 17, 2024
@aam-digital-ci
Copy link
Collaborator

🎉 This PR is included in version 3.35.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@aam-digital-ci aam-digital-ci added the released managed by CI (semantic-release) label Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released on @master managed by CI (semantic-release) released managed by CI (semantic-release)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Setup Wizard: Configure static entity details like label and icon
3 participants