Skip to content

Nikolai Romanov | oct2025-3 | Legacy code | Sprint 1 | Purple Forest: New Feature: Unfollow - #2

Open
kolya-rm wants to merge 9 commits into
mainfrom
coursework/feature-unfollow
Open

Nikolai Romanov | oct2025-3 | Legacy code | Sprint 1 | Purple Forest: New Feature: Unfollow#2
kolya-rm wants to merge 9 commits into
mainfrom
coursework/feature-unfollow

Conversation

@kolya-rm

@kolya-rm kolya-rm commented Jun 3, 2026

Copy link
Copy Markdown
Owner

Learners, PR Template

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

Changelist

This branch based on the bugfix branch.
Implemented unfollow functionality for Purple forest:

  • in fronted side updated the profile view follow button setup and click handle, and implemented unfollowUser function on the api.mjs;
  • in backend side app is updated with new route rule, the function do_unfollow is added in the endpoints.py to handle user unfollow request, the function unfollow is implemented in the follows.py to update followers data in the database.

Questions

kolya-rm added 9 commits May 31, 2026 21:10
 -  wrong query selector, for get login component, "[data-action=''login]" replaced by "[data-form='logout']"
 -  wrong event for login "click" replaced by "submit".
…ext length control. If inputed in the form text ovverides max length it will be short to max length.
…iew function. Because it invokes the state.updateState function which dispatchs "state-change" event. "state-change" event is listened by documend and is handled with the router.handleRouteChange function which after parsing window location hash calls the hashtag.hastagView function. Which leads to the infinite loop.
…quest if blooms with requested hashtag have got. In views/hashtag.hashtagView it comparates requested hashtage and saved in the state. If they equals it renders saved in the state blooms otherwise requested new blooms via apiService.
…ags. Replaced any non-hash symbol by any word symbol in regular expression used to find and replace hashtag.
  - set isn't visible only for self profile;
  - added data-is-following attribute to store profile.is_following value;
  - added setting "Follow" "Unfollow" button text depending on profile.is_following value.
…leFollow to invoke the api service followUser function in case of user isn't followed and to invoke the unfollowUser function in case of user is followed.
… options object, contains the user to unfollow object.
 - added the url rule for the application in the main.py  handling /unfollow endpoint;
 - imlemented the do_unfollow function in the endpoints.py to handling an unfollow user request;
 - implemented the unfollow function in the follows.py to handle an unfollow request data in the database;
 - fixed unfollow request endpoint in the frontend side api.mjs unfollowUser function.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant