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

Convert Wikimedia classes to components #3407

Merged
merged 1 commit into from
Jan 9, 2025

Conversation

reosarevok
Copy link
Member

Description

This turns the WikipediaExtract file (and the mostly deprecated CommonsImage one) from classes to React components, and moves from jQuery to useCallback/useEffect hooks.

Testing

Manually, by loading some files with both in a dev setup, such as /artist/ae0b2424-d4c5-4c54-82ac-fe3be5453270

@reosarevok reosarevok added the Refactoring Refactoring-only PRs (eslint fixes etc) label Nov 8, 2024
@reosarevok reosarevok force-pushed the wikimedia-components branch 2 times, most recently from bc9ffbf to 7c31f89 Compare November 27, 2024 18:03
Copy link
Member

@mwiencek mwiencek left a comment

Choose a reason for hiding this comment

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

Tested locally and works great, but could use a small cleanup.

root/static/scripts/common/components/CommonsImage.js Outdated Show resolved Hide resolved
root/static/scripts/common/components/CommonsImage.js Outdated Show resolved Hide resolved
root/static/scripts/common/components/WikipediaExtract.js Outdated Show resolved Hide resolved
root/static/scripts/common/components/WikipediaExtract.js Outdated Show resolved Hide resolved
root/static/scripts/common/components/WikipediaExtract.js Outdated Show resolved Hide resolved
This turns the WikipediaExtract file (and the mostly deprecated
CommonsImage one) from classes to React components, and moves from
jQuery to useEffect hooks.
@reosarevok reosarevok force-pushed the wikimedia-components branch from 7c31f89 to 47ee61c Compare January 9, 2025 09:17
@reosarevok
Copy link
Member Author

Made the changes. Should the same (or similar) be done in AcoustIdCell then?

@mwiencek
Copy link
Member

mwiencek commented Jan 9, 2025

Made the changes. Should the same (or similar) be done in AcoustIdCell then?

We could remove the state setters from the useCallback dependency list there, but not essential for this PR.

@reosarevok reosarevok merged commit 766e781 into metabrainz:master Jan 9, 2025
2 checks passed
reosarevok added a commit that referenced this pull request Jan 13, 2025
* master:
  Update POT files using the production database
  Merge pull request #3447 from reosarevok/MBS-13866
  Convert Wikimedia classes to components (#3407)
  MBS-13897: Display "Account admin" under user types on profile
  Link to bot docs from user types list
  Link to beginner docs from user types list
  MBS-13896: Fix anchor links for editor types
  Merge pull request #3443 from reosarevok/MBS-13870
  Merge pull request #3445 from reosarevok/MBS-13895
  MBS-13857: Block unicode Tags block in usernames
  MBS-13893: Block invisible characters (Hangul, Braille) in usernames
  MBS-13886: Don't crash on wrong link_type for paged rels (#3434)
  MBS-13781: Support browsing genres by collection in the API (#3394)
  Preserve the selected AC filter in more cases
  Fix untranslatable statistics label
  Don't force new vote names to be translated twice
  Clean broken enter_votes code
  MBS-13770: Allow admins to auto-approve and auto-reject any edit
  MBS-13770: Add new Admin approval/rejection votes
  Keep filter when navigating with ArtistIndex footer
  MBS-11950: Allow filtering VA RGs for artist
  MBS-8186: Allow filtering unofficial RG list
  Split and document Data::Alias test
  MBS-13564: Correctly override primary on alias locale change
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Refactoring Refactoring-only PRs (eslint fixes etc)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants