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

FtRadioButton and FtCheckboxList v-model and composition API #6463

Merged
merged 1 commit into from
Dec 29, 2024

Conversation

absidue
Copy link
Member

@absidue absidue commented Dec 27, 2024

FtRadioButton and FtCheckboxList v-model and composition API

Pull Request Type

  • Peformance Improvement (hopefully)
  • Refactoring - Composition API migration

Related issue

Description

This pull request migrates the FtRadioButton and FtCheckboxList components to the composition API and implements the component v-model system for them. The component v-model setup allows us to get rid of the dodgy watching properties on the refs and calling methods on them setup that we previously had, simplifying it to just refs and watchers. This avoids extra component updates as now only those who's data actually changed get updated/re-rendered and we also only make calls to the store for values that actually changed.

Hopefully this improves the performance, if not then at least we've migrated two more components to the composition API and still have less complicated code in the FtSearchFilters component.

In Vue 3.4 the Vue developers introduced the defineModel() compiler macro which takes away the boilerplate of the component v-model implementation, so we'll be able to simplify the code even further when we update to Vue 3. The backport of the compositon API into Vue 2.7 happened well before the Vue 3.4 release, so we don't have access to the macro in Vue 2.7.

Testing

Test that the search filters still work correctly.
@efb4f5ff-1298-471a-8973-3d47447115dc Please also test that this improves the performance of the search filters.

Desktop

  • OS: Windows
  • OS Version: 10
  • FreeTube version: 7b312f7

@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Dec 27, 2024
@FreeTubeBot FreeTubeBot enabled auto-merge (squash) December 27, 2024 21:09
@efb4f5ff-1298-471a-8973-3d47447115dc
Copy link
Member

efb4f5ff-1298-471a-8973-3d47447115dc commented Dec 28, 2024

Test that the search filters still work correctly.

Works like a charm

@efb4f5ff-1298-471a-8973-3d47447115dc Please also test that this improves the performance of the search filters.

This PR does not improve the performance

@efb4f5ff-1298-471a-8973-3d47447115dc

we discovered that the performance issues i was seeing were related to something else. That will be resolved in an upcoming PR

@FreeTubeBot FreeTubeBot merged commit 3809df5 into FreeTubeApp:development Dec 29, 2024
5 checks passed
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Dec 29, 2024
@absidue absidue deleted the search-filters-perf branch December 29, 2024 02:22
PikachuEXE added a commit to PikachuEXE/FreeTube that referenced this pull request Dec 30, 2024
* development: (75 commits)
  Bump lefthook from 1.10.0 to 1.10.1 (FreeTubeApp#6480)
  Bump bgutils-js from 3.1.0 to 3.1.1 (FreeTubeApp#6482)
  Translated using Weblate (Estonian)
  Translated using Weblate (Serbian)
  Translated using Weblate (Polish)
  Translated using Weblate (Czech)
  Translated using Weblate (English (United Kingdom))
  Translated using Weblate (Hungarian)
  Translated using Weblate (Hungarian)
  Translated using Weblate (German)
  Translated using Weblate (Italian)
  Translated using Weblate (French)
  Translated using Weblate (Chinese (Simplified Han script))
  FtRadioButton and FtCheckboxList v-model and composition API (FreeTubeApp#6463)
  Disable store strict mode, due to performance problems because of the amount of data in the store (FreeTubeApp#6469)
  [Feature] Playlist: Sort videos by published date (FreeTubeApp#6280)
  Migrate ChannelAbout to the composition API (FreeTubeApp#6470)
  Translated using Weblate (German)
  compress frappe svgs (FreeTubeApp#6467)
  Translated using Weblate (Hungarian)
  ...
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.

5 participants