-
Notifications
You must be signed in to change notification settings - Fork 887
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
Add setting to auto load comment section #3352
Add setting to auto load comment section #3352
Conversation
I think a toggle should probably be used instead (percentage might be confusing for users) |
I don't understand Note: Percentage is required to adjust to user device screen size & preference (on window size) |
Chunky means don't expose any percentages to the user, pick one and then have a single on and off switch. Also instead of writing your own IntersectionObserver code, you can use vue-observe-visibility, which we already have to lazy load the videos etc in the lists. See ft-list-lazy-wrapper to see how it's used there. |
Problem is
Let me take a look at vue-observe-visibility... |
If the comment section is always visible in large windows people will expect it to auto load straight away anyway. |
Updated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to autoload comments when i almost reach the 'load more comments' button
|
Unnecessary translation entries removed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's my habit to ensure the values in DB is more flexible than the UI when possibility of future change is present
return this.$store.getters.getCommentAutoLoadCondition | ||
}, | ||
|
||
commentAutoLoadConditionEnabled: function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using string is intentional even though UI is a toggle
I am not excluding the possibility to introduce other values later
No DB change needed when that's the case
@@ -266,6 +274,12 @@ export default defineComponent({ | |||
}) | |||
}, | |||
|
|||
updateCommentAutoLoadConditionEnabled: function(enabled) { | |||
this.updateCommentAutoLoadCondition( | |||
enabled ? '0%' : 'disabled' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Intentional "frontend boolean to backend enum" conversion
When i reach the bottom of the comment section i want it to auto load more comments VirtualBoxVM_R1XNzfC1mb.mp4 |
Different feature, different PR please |
@PikachuEXE I doubt we'll be adding more values in the future, not having it be a boolean sounds like unnecessary complication to me. Although considering that in most screenshots you've sent, you have had FreeTube at a massive window size, I'm guessing that the reason you don't want to switch to a boolean, is so that you can have a different percentage in your personal settings db, while everyone else uses 0%. |
As user i expect the following when i enable this feature:
IMO (again from an user perspective) the PR in its current iteration is a half baked feature. So to come back to your question i dont see this as a different feature. |
Is there a path to update the setting from boolean to string if it ever happens? Also are 4 new methods instead of 2 really that complicated? |
I just don't think it's necessary to over engineer something, just in case we change our minds in the future, as that is extremely unlikely to happen. |
Updated |
src/renderer/components/watch-video-comments/watch-video-comments.vue
Outdated
Show resolved
Hide resolved
Co-authored-by: absidue <48293849+absidue@users.noreply.github.com>
beaa8cf
to
31d16a0
Compare
Setting updated Also removed the delay on comment loading (I didn't know there is a ready event) |
src/renderer/components/watch-video-comments/watch-video-comments.js
Outdated
Show resolved
Hide resolved
it shows being greyed out but enabled. That could potentially be confusing so i think u should also disable it.. AFAIK we also do that with other settings like that |
Done |
@ChunkyProgrammer ur powers are needed |
Pull Request Type
Related issue
N/A
Description
Add a setting to allow comment section to be auto loaded, default disabled
When enabled (with a percentage), comment section bottom when appears pass N% above bottom of viewport will have comment data auto loaded once (won't load it if data already being loaded, loaded)
Screenshots
New setting position (can be adjusted)
Testing
A. Disabled
B. 0% from window/view port bottom
You can test other settings as well, those percentage values (yes zero or negative values) are just passed into
IntersectionObserver
rootMargin
Desktop
Additional context
I am not sure if that's good enough