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

Port User functionality to TypeScript #226

Merged
merged 7 commits into from
Dec 25, 2021
Merged

Conversation

pixeldesu
Copy link
Member

Fixes #166

To explain some of the changes:

  • Technically not in scope, but fits here: More aliases so utilities don't require moving up all the folders but can be imported with just utilities/ instead.
  • Added an $.on substitute in vanilla JS, mainly for the use case of global event listeners, which are used plenty in Retrospring, this will make further porting easier.
  • The event initUser listens on is DOMContentLoaded and not turbolinks:load. Why? Don't need to set up global event handlers on every turbolinks navigation, once is enough for page scope.
  • The header parallax code is gone without a replacement. Looking at my own tests it probably didn't even really work for a while anyway.

To test this PR properly:

  • (Un)follow a user
    • ...on a profile
    • ...in the user list on a profile
  • Report a user

@codecov
Copy link

codecov bot commented Dec 25, 2021

Codecov Report

Merging #226 (8b583e1) into master (fcd7217) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #226   +/-   ##
=======================================
  Coverage   59.91%   59.91%           
=======================================
  Files          88       88           
  Lines        2068     2068           
=======================================
  Hits         1239     1239           
  Misses        829      829           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fcd7217...8b583e1. Read the comment docs.

@@ -0,0 +1,9 @@
type OnCallbackFunction = (event: Event) => void;
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: could be called EventHandler

@nilsding nilsding removed their request for review December 25, 2021 21:15
@raccube raccube merged commit 0f654a4 into master Dec 25, 2021
@raccube raccube deleted the refactor/user-typescript branch December 25, 2021 21:44
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.

Port User functionality to TypeScript
2 participants