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

FEATURE: Make it possible to reassign posts on the topic level assign modal #562

Conversation

AndrewPrigorshnev
Copy link
Contributor

@AndrewPrigorshnev AndrewPrigorshnev commented Apr 12, 2024

This adds a new dropdown to the topic level assign modal. A topic may contain several assignments, the topic itself may be assigned and also some of the replies may be assigned. With this new dropdown, it's possible now to edit all the assignments in one go:

Screenshot 2024-04-12 at 20 39 52 Screenshot 2024-04-12 at 20 39 58

@AndrewPrigorshnev AndrewPrigorshnev force-pushed the feature/make-possible-to-reasign-posts-in-the-topic-level-assign-modal-alt branch 3 times, most recently from d77dfad to c3214f0 Compare April 12, 2024 16:43
@AndrewPrigorshnev AndrewPrigorshnev marked this pull request as ready for review April 12, 2024 16:46

async #assign() {
for (const assignment of this.assignments) {
if (assignment.isEdited) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We don't send server requests for assignments that have not been edited. In case user edits several assignments, it will send several requests to the server. I'm not sure if it's worth introducing a server method here to do all that in one request, but it may be done in a separate PR in the future if case we decide we want it.

import { tracked } from "@glimmer/tracking";
import EmberObject from "@ember/object";

export class Assignment extends EmberObject {
Copy link
Contributor Author

@AndrewPrigorshnev AndrewPrigorshnev Apr 12, 2024

Choose a reason for hiding this comment

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

I've introduced this model, but I haven't migrated all code to using it because that would extend the refactoring surface too much. It would be great to slowly migrate all code to using it, I think that will help simplify the code of the plugin. Now it contains only fields, but as soon as more code start using it, it will become possible to move domain logic in here.

@AndrewPrigorshnev AndrewPrigorshnev changed the title FEATURE: Reassigning posts from the topic level assign modal FEATURE: Make it possible to reassign posts on the topic level assign modal Apr 12, 2024
… modal

This adds a new dropdown to the topic level assign modal. A topic may contain several assignments, the topic itself may be assigned and also some of the replies may be assigned. With this new dropdown, it's possible now to edit all the assignments in one go.
@jjaffeux jjaffeux force-pushed the feature/make-possible-to-reasign-posts-in-the-topic-level-assign-modal-alt branch from c3214f0 to 0f22e6e Compare April 16, 2024 10:38
@jjaffeux jjaffeux merged commit c1d4633 into main Apr 16, 2024
5 checks passed
@jjaffeux jjaffeux deleted the feature/make-possible-to-reasign-posts-in-the-topic-level-assign-modal-alt branch April 16, 2024 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants