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

Frontend/feature/moderation-not-moderator-jury-backend-connections #599

Conversation

enfurars
Copy link
Contributor

Tag selection on moderation-not-jury page is connected with backend with 2 API requests (moderators/my-tags) GET and POST. GET request is executed at every render of the page and POST request is executed every change on tag list. If a user selects more than 5 tags or selects no tags, no request is sent and warning message is shown. The information of member being moderator or not is also taken from backend using profile/myProfile endpoint and necessary page is shown accordingly. On the moderation-not-moderator page when a member clicks apply button a POST request is sent to /moderators/request-promotion end point and a success message to user is shown. Necessary CSS updates of new components are also done. Also I am rendering the posts with another GET request to endpoint /moderators/my-requests after a change occurs on the tags. I have also tested manually these new features as possible as I can.

Tag selection on moderation-not-jury page is connected with backend with 2 API requests (moderators/my-tags) GET and POST. GET request is executed at every render of the page and POST request is executed every change on tag list. If a user selects more than 5 tags or selects no tags, no request is sent and warning message is shown. The information of member being moderator or not is also taken from backend using profile/myProfile endpoint and necessary page is shown accordingly. On the moderation-not-moderator page when a member clicks apply button a POST request is sent to /moderators/request-promotion end point and a success message to user is shown. Necessary CSS updates of new components are also done.
I was getting error message from the /moderators/my-tags POST endpoint because I was trying to send all of the tag information,however only the last changed one was expected. It is fixed in this commit. Also now I am rendering the posts with another GET request to endpoint /moderators/my-requests after a change occurs on the tags.
@enfurars enfurars added Priority: High Serious problem that could block progress. Status: In Review Waiting for reviewers response to changes. Type: Feature A new feature of the product, which has yet to be developed. Platform: Frontend Frontend related issues labels Dec 20, 2023
@enfurars enfurars self-assigned this Dec 20, 2023
@AliNasra
Copy link
Contributor

The backend integration seems off somehow. For instance, when I click on the Sports tag, I get the question "When will Microsoft acquire OpenAI" whose only tag is technology, though I didn't pick it from among the choices. With the current selections, I thought I would be getting polls with tags related to politics and sports. Correct me if I am missing something please, Enes!
image

@enfurars
Copy link
Contributor Author

enfurars commented Dec 21, 2023

The backend integration seems off somehow. For instance, when I click on the Sports tag, I get the question "When will Microsoft acquire OpenAI" whose only tag is technology, though I didn't pick it from among the choices. With the current selections, I thought I would be getting polls with tags related to politics and sports. Correct me if I am missing something please, Enes! image

Yes, it expected to be so because the backend sends the same data no matter what for now. We have tested it with @EmreBatuhan manually. As I mentioned in the PR explanation I am re-rendering the posts after a change occurs on the tags. It will work as intended when backend updates the response. New tests will be made then. If any new problem arises we will be fixing it. For now that part is completed for front-end.

@AliNasra
Copy link
Contributor

AliNasra commented Dec 21, 2023

If that's the case, I think the UI is ready to go though I recommend we merge this branch when the backend is fixed!

@AliNasra
Copy link
Contributor

I have contacted @EmreBatuhan. We agreed that the UI can be merged for now and it shall be followed by a potential bug fix PR.

@AliNasra AliNasra merged commit eaa4a62 into frontend/development Dec 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform: Frontend Frontend related issues Priority: High Serious problem that could block progress. Status: In Review Waiting for reviewers response to changes. Type: Feature A new feature of the product, which has yet to be developed.
Projects
None yet
2 participants