nihalramesh / pe

0 stars 0 forks source link

Add command after sorting in ascending order #13

Open nihalramesh opened 2 weeks ago

nihalramesh commented 2 weeks ago

When I sort the contacts in ascending order, then add a contact, this contact automatically goes to the end of the list, rather than being placed in its respective alphabetical position.

Steps to Reproduce:

  1. Sort asc
  2. Add n/ Aaron Beng ....

Expected Behaviour: This new contact with the name Aaron Beng should be the first contact

Observed Behaviour: However, it ends up at the end of the list

Suggested Behaviour: When contacts are in the sorted format, and any new contacts are added, ideally they should fall to their respective alphabetical position

Screenshot 2024-11-15 at 17.25.15.png

nus-pe-script commented 2 weeks ago

Team's Response

Same as edit, commands changing persons fields reset the filtered list back to unfiltered list

The 'Original' Bug

[The team marked this bug as a duplicate of the following bug]

Executing commands removes the list filter

Steps to reproduce

Execute:

  1. find Alice
  2. edit 1 n/Alice Bowen

Expected

The respective contact to be updated in the filtered list.

Actual

The contact is updated but the filter is removed and shows the entire list.

alice 1.png

alice 2.png

Users may want to see the immediate change in their edit commands and removing the filter would require additional effort for users to ensure their contact is updated. This also applies to other commands such as sort.


[original: nus-cs2103-AY2425S1/pe-interim#728] [original labels: severity.Low type.FunctionalityBug]

Their Response to the 'Original' Bug

[This is the team's response to the above 'original' bug]

Thank you for bringing this up. However, regarding your point about "may want to see the immediate change in their edit commands", the immediate change is visible in the Result Display. As for the person list, it is intentionally designed not to remain on the selected person.

Items for the Tester to Verify

:question: Issue duplicate status

Team chose to mark this issue as a duplicate of another issue (as explained in the Team's response above)

Reason for disagreement: [replace this with your explanation]


## :question: Issue response Team chose [`response.NotInScope`] - [x] I disagree **Reason for disagreement:** I did notice that the User Guide explicitly mentions that sorting is a one-time action and does not persist when new contacts are added. This clarification is helpful for managing user expectations. However, users generally expect that once a list is sorted alphabetically, the application will maintain that order when new entries are added. This is the intuitive behaviour seen in many applications and systems. This would save users from having to re-sort the list manually each time they add a new entry. Many users may expect sorting to persist automatically, as this aligns with common behaviour in similar applications. Addressing this could reduce confusion and improve the overall usability of the product. Additionally, this enhancement also seems relatively straightforward to implement, as it primarily involves reapplying the sorting logic when a new contact is added. Since the sorting function is already implemented, the main adjustment would be to trigger this sorting function when a new contact is added, until the user chooses to sort the contacts in a different order. This avoids duplicating code, and leverages the existing logic. Perhaps this functionality could be considered for planned enhancements in future iterations. It would provide a more seamless and polished experience while keeping in line with user expectations.