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

Cleanup some template conditionals #3888

Merged
merged 1 commit into from
Aug 16, 2023

Conversation

absidue
Copy link
Member

@absidue absidue commented Aug 15, 2023

Cleanup some template conditionals

Pull Request Type

  • Performance improvement

Description

Changes some v-ifs to v-if-else, swaps some divs to template when they don't contribute to the layout and are just used as wrappers for the v-if and adds some template wrappers to replace consecutive identical v-ifs.

I didn't make any changes to the community posts (could be changed to v-else-if) to avoid conflicts with #3865.

Probably won't make a big difference but it should slighty improve performance, as it avoids extra unnecessary divs getting created and if-else-if is faster than if-if, because it doesn't have to check both conditions if the first one succeeds.

Testing

This is just to confirm that it still behaves the same as before.

  1. Check that changing the download behaviour in the download setting still makes it toggle the elements below it
  2. Check that the edit and new profile screens still look the same
  3. Check that toggling the use proxy setting shows and hides the proxy configuration
  4. Check that the correct tabs show up on the subscriptions page, depending on your distraction free settings
  5. If the dearrow titles or sponsor block settings are enabled you should see the sponsor block URL box

@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Aug 15, 2023
@FreeTubeBot FreeTubeBot enabled auto-merge (squash) August 15, 2023 19:56
@FreeTubeBot FreeTubeBot merged commit 723739f into FreeTubeApp:development Aug 16, 2023
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Aug 16, 2023
@absidue absidue deleted the cleanup-v-if branch August 16, 2023 08:59
PikachuEXE added a commit to PikachuEXE/FreeTube that referenced this pull request Aug 21, 2023
* development:
  Translated using Weblate (Greek)
  Fix locales getting unnecessarily reprocessed for incremental builds (FreeTubeApp#3893)
  Fix the layout of the hashtag page (FreeTubeApp#3886)
  Translated using Weblate (French)
  Translated using Weblate (Swedish)
  Translated using Weblate (Indonesian)
  Translated using Weblate (Italian)
  Translated using Weblate (Portuguese (Brazil))
  Translated using Weblate (Italian)
  Translated using Weblate (Portuguese)
  Cleanup some template conditionals (FreeTubeApp#3888)
  Add semantic roles to make the site more accessible (FreeTubeApp#3887)
  Translated using Weblate (Japanese)
  Fix Update Subscription Details function when channel name is null (FreeTubeApp#3884)
  Translated using Weblate (Spanish)
  Translated using Weblate (Romanian)
  Translated using Weblate (Hebrew)
  local API: Add support for PageHeader channel header (FreeTubeApp#3871)
  Translated using Weblate (Chinese (Traditional))

# Conflicts:
#	src/renderer/components/ft-list-playlist/ft-list-playlist.vue
#	src/renderer/components/ft-list-video/ft-list-video.vue
#	src/renderer/views/UserPlaylists/UserPlaylists.vue
PikachuEXE added a commit to PikachuEXE/FreeTube that referenced this pull request Aug 21, 2023
* feature/playlist-2023-05:
  Translated using Weblate (Greek)
  Fix locales getting unnecessarily reprocessed for incremental builds (FreeTubeApp#3893)
  Fix the layout of the hashtag page (FreeTubeApp#3886)
  Translated using Weblate (French)
  Translated using Weblate (Swedish)
  Translated using Weblate (Indonesian)
  Translated using Weblate (Italian)
  Translated using Weblate (Portuguese (Brazil))
  Translated using Weblate (Italian)
  Translated using Weblate (Portuguese)
  Cleanup some template conditionals (FreeTubeApp#3888)
  Add semantic roles to make the site more accessible (FreeTubeApp#3887)
  Translated using Weblate (Japanese)
  Fix Update Subscription Details function when channel name is null (FreeTubeApp#3884)
  Translated using Weblate (Spanish)
  Translated using Weblate (Romanian)
  Translated using Weblate (Hebrew)
  local API: Add support for PageHeader channel header (FreeTubeApp#3871)
  ! Fix invalid prop type warning
  Translated using Weblate (Chinese (Traditional))
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