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

Channel community page #1568

Merged
merged 104 commits into from
Mar 4, 2023
Merged
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
1df9f73
Comunity page strings, Communtiy tab, Community initial API call
GilgusMaximus Apr 13, 2021
034fc4c
Comunity page strings, Communtiy tab, Community initial API call
GilgusMaximus Apr 13, 2021
736fca5
Data returning added
GilgusMaximus Apr 19, 2021
bce1b5b
Merge
GilgusMaximus Apr 19, 2021
d452ceb
Comunity page strings, Communtiy tab, Community initial API call
GilgusMaximus Apr 13, 2021
13ad637
Data returning added
GilgusMaximus Apr 19, 2021
134159b
Merge branch 'communityPage' of github.com:GilgusMaximus/FreeTube int…
GilgusMaximus Apr 19, 2021
ebfe1c8
Images are now displayed in the community tab
GilgusMaximus Apr 19, 2021
fc747c5
Comunity page strings, Communtiy tab, Community initial API call
GilgusMaximus Apr 13, 2021
5ab0a84
Data returning added
GilgusMaximus Apr 19, 2021
9d6ba3b
Images are now displayed in the community tab
GilgusMaximus Apr 19, 2021
59903db
Added primitive video display
GilgusMaximus Apr 21, 2021
089b450
Current changes
GilgusMaximus May 13, 2021
157db72
Current changes Merge
GilgusMaximus May 13, 2021
f7cb1de
Added preston's change with the ftcard and started on some layout basics
GilgusMaximus May 14, 2021
d28af79
Created Community Post Component and added fetch more button + functi…
GilgusMaximus May 14, 2021
1b012b1
Fixed problem with videothumbnails not loading and adjusted their hei…
GilgusMaximus May 16, 2021
5bfec73
Added poll and ft-list-video to the community page
GilgusMaximus May 16, 2021
5d1485d
Added author name placeholder (missing in module), the published date…
GilgusMaximus May 17, 2021
2b65ffa
Added basis for community page playlists
GilgusMaximus May 31, 2021
63af918
Finalized a setup for playlists when wide enough
GilgusMaximus Jun 1, 2021
3b62b75
Merge
GilgusMaximus Aug 6, 2021
e8b2d83
Fix for missing key in custom list
GilgusMaximus Aug 6, 2021
f7b8075
Added publish date translation
GilgusMaximus Aug 6, 2021
f64d225
Merge branch 'development' into communityPage
PrestonN Aug 16, 2021
7275896
Merge branch 'development' into communityPage
PrestonN Aug 16, 2021
fa0430c
Merge branch 'development' into communityPage
PrestonN Aug 16, 2021
be4130b
Merge branch 'development' into communityPage
PrestonN Aug 16, 2021
2cca684
Add empty alt tags
ChunkyProgrammer Oct 2, 2021
6d49c34
Merge branch 'development' into communityPage
ChunkyProgrammer Oct 2, 2021
4bb3d7b
fix accessibility issue
ChunkyProgrammer Oct 2, 2021
b474a9f
change: ununique ids to classes
ChunkyProgrammer Oct 2, 2021
f5d78a8
add missing alt tag
ChunkyProgrammer Oct 13, 2021
9177412
Merge branch 'development' of https://github.com/FreeTubeApp/FreeTube…
ChunkyProgrammer Nov 14, 2021
e722529
Redirect channel/id/community to the channel's community tab
ChunkyProgrammer Nov 14, 2021
1402439
update yt-channel-info
ChunkyProgrammer Mar 14, 2022
878efc1
update to 3.0.1
ChunkyProgrammer Apr 6, 2022
06b79ee
Update yarn.lock
ChunkyProgrammer Apr 6, 2022
9dcf8d1
Merge branch 'update-ytchannelinfp' into pr/1568
ChunkyProgrammer Apr 7, 2022
cdc4512
add basic multiImage support
ChunkyProgrammer Apr 7, 2022
6fa4811
use tiny-slider for multiImage community posts
ChunkyProgrammer Apr 7, 2022
40bdaf1
Merge branch 'development' into pr/1568
ChunkyProgrammer Apr 8, 2022
408bcac
update getChannelCommunityPostsMore
ChunkyProgrammer Apr 8, 2022
491d24d
Merge remote-tracking branch 'upstream/development' into pr/1568
ChunkyProgrammer May 13, 2022
8db0d75
Merge branch 'development' into pr/1568
ChunkyProgrammer May 24, 2022
480e243
Update yarn.lock
ChunkyProgrammer May 24, 2022
2ba1711
Merge branch 'development' into pr/1568
ChunkyProgrammer Jun 1, 2022
1f6a196
fix yarn lock
ChunkyProgrammer Jun 1, 2022
f7120b1
swap community and about tab
ChunkyProgrammer Jun 2, 2022
bce01d4
Merge branch 'development' into pr/1568
ChunkyProgrammer Jun 20, 2022
c840763
Update yarn.lock
ChunkyProgrammer Jun 20, 2022
340b95c
Merge branch 'development' into communityPage
GilgusMaximus Jul 9, 2022
c7824a1
Fix missing comma
GilgusMaximus Jul 10, 2022
404d07e
Removed trailing spaces
GilgusMaximus Jul 10, 2022
a8e3daf
Clearing all community post data when changing to another channel
GilgusMaximus Jul 13, 2022
77c9411
Restructuring of how the post cards are added, Empty page text,
GilgusMaximus Jul 13, 2022
16222b1
Fixed display text path
GilgusMaximus Jul 13, 2022
7a9a1ca
Fix lint"
GilgusMaximus Jul 13, 2022
486ae51
Adjusted css to fit to new layout
GilgusMaximus Jul 14, 2022
e3f2379
Final touches community page to tidy up the console
GilgusMaximus Jul 14, 2022
aef9ef1
Merge branch 'development' into pr/1568
ChunkyProgrammer Oct 11, 2022
ca80c2f
fix icons, fix linter
ChunkyProgrammer Oct 11, 2022
6a53191
Merge branch 'development' into pr/1568
ChunkyProgrammer Oct 18, 2022
fa3a962
fix hiding showmore button for community page
ChunkyProgrammer Oct 18, 2022
942cfeb
fix showToast calls
ChunkyProgrammer Oct 18, 2022
60ebbf0
change all this.showToast to showToaast
ChunkyProgrammer Oct 18, 2022
b1fbc64
Merge branch 'development' into pr/1568
ChunkyProgrammer Nov 1, 2022
067fdef
reinstall tinyslider
ChunkyProgrammer Nov 1, 2022
692bd8f
use helpers
ChunkyProgrammer Nov 1, 2022
1012e6d
Merge branch 'development' into pr/1568
ChunkyProgrammer Nov 14, 2022
b2e82f1
Merge branch 'development' into pr/1568
ChunkyProgrammer Nov 14, 2022
fa55d8e
small fixes
ChunkyProgrammer Nov 14, 2022
e4af04b
Merge branch 'development' into pr/1568
ChunkyProgrammer Dec 20, 2022
cd155a1
Merge branch 'development' into pr/1568
ChunkyProgrammer Jan 4, 2023
20b7efa
Merge branch 'development' into pr/1568
ChunkyProgrammer Jan 24, 2023
7fde6e6
fix: getting continuation of community posts
ChunkyProgrammer Jan 24, 2023
fe90d99
remove unused code
ChunkyProgrammer Jan 24, 2023
2afdcdf
improve slider style import
ChunkyProgrammer Jan 24, 2023
539cebd
fix hiding 'ShowMore' button
ChunkyProgrammer Jan 24, 2023
9b97007
fix weird typo in css
ChunkyProgrammer Jan 24, 2023
d4ac558
add invidous community tab support
ChunkyProgrammer Jan 24, 2023
e55dac1
remove console testing code
ChunkyProgrammer Jan 24, 2023
302031b
Apply suggestions from code review
ChunkyProgrammer Jan 24, 2023
bf207be
implement suggestions, improve thumbnail replacement
ChunkyProgrammer Jan 24, 2023
174d13b
Merge branch 'communityPage' of https://github.com/GilgusMaximus/Free…
ChunkyProgrammer Jan 24, 2023
70e8bb2
use flip horizontal
ChunkyProgrammer Jan 24, 2023
267c1b9
readd invidious fallback code, remove author name workaround
ChunkyProgrammer Jan 26, 2023
484334b
Merge branch 'development' into pr/1568
ChunkyProgrammer Jan 26, 2023
f64678d
replace another google domain when using invidious
ChunkyProgrammer Jan 26, 2023
bb1dbf0
Merge branch 'development' into pr/1568
ChunkyProgrammer Feb 12, 2023
f6f45b4
suppport invidious multiImage posts
ChunkyProgrammer Feb 12, 2023
480613f
Merge branch 'development' into pr/1568
ChunkyProgrammer Mar 1, 2023
b4f3f53
Use youtube.js for community posts
ChunkyProgrammer Mar 1, 2023
f5d5795
add invidious polls, remove support for fetching more
ChunkyProgrammer Mar 1, 2023
8263864
reorder icons alpabetically
ChunkyProgrammer Mar 1, 2023
17603ab
re-allow loading more when using localapi
ChunkyProgrammer Mar 1, 2023
955a336
fix styling of multiImage, hide NA text
ChunkyProgrammer Mar 1, 2023
6126208
fix loading playlist
ChunkyProgrammer Mar 1, 2023
125b233
fix spacing of items
ChunkyProgrammer Mar 1, 2023
3af757f
fix issue with direct url to community tab
ChunkyProgrammer Mar 1, 2023
9ad7d64
make review recommendations
ChunkyProgrammer Mar 2, 2023
279080c
Merge branch 'development' into pr/1568
ChunkyProgrammer Mar 2, 2023
f30a817
Merge branch 'development' into pr/1568
ChunkyProgrammer Mar 3, 2023
baf282a
fix displaying selected tab, get best quality image
ChunkyProgrammer Mar 3, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
404 changes: 404 additions & 0 deletions src/renderer/components/ft-community-post/ft-community-post.js

Large diffs are not rendered by default.

123 changes: 123 additions & 0 deletions src/renderer/components/ft-community-post/ft-community-post.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
@use "../../sass-partials/_ft-list-item"
.circle
height: 10px
width: 10px
background-color: transparent
border-radius: 50%
border-style: solid
border-width: 2px
/*outline: #E0E0E0 solid*/
display: inline-block
float: left
top: 8px
position: relative
left: 5px

.poll-text
border-radius: 5px
border-style: solid
border-width: 2px
padding: 5px 25px 5px

.poll-option
padding-bottom: 10px

.communityImage
width: 100%
height: 100%

.communityThumbnail
-webkit-border-radius: 50%
border-radius: 50%
height: 55px
width: 55px
margin-right: 5px
.author-div
display: flex
#authorName
margin: 5px 6px 0px 5px
font-size: 15px
alignment: left
font-weight: bold
#publishedText
/* margin: 20px 6px 0px 5px*/
margin: 5px 6px 0px 5px
font-size: 15px
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is aesthetically unpleasing in practice (I would guess that it is borrowing from some other part of the code base like the watch-video-comments styling). The author and timestamp are oddly elevated above the thumbnail.

Copy link
Member

Choose a reason for hiding this comment

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

I'm pretty sure that this styling is the same as comments


.bottomSection
margin-top: 4px
font-size: 14px
color: var(--tertiary-text-color)
display: block
flex-direction: column
text-align: left
max-width: 210px

@media screen and (max-width: 680px)
margin-left: 0
text-align: left

.likeBar
height: 8px
border-radius: 4px
margin-bottom: 4px

#thumbs-down-icon
transform: scaleX(-1)
-moz-transform: scaleX(-1)
-webkit-transform: scaleX(-1)
-ms-transform: scaleX(-1)

.likeCount
margin-left: 5px
margin-right: 6px

.dislikeCount
margin-right: 10px

.playlistWrapper
display: flex
.videoThumbnail
width: 50%
display: flex
position: relative
margin-top: auto
margin-bottom: auto
.thumbnailImage
width: auto
height: auto
display: block
max-width: 100%


.playlistText
word-wrap: break-word
width: 50%
margin-left: 10px
.playlistAuthor
font-size: small
.playlistVideoCount
font-size: smaller

.playlistTitle
color: var(--primary-text-color)

.playlistPreviewVideos
font-size: small
width: 100%
display: flex
color: var(--primary-text-color)
padding-top: 10px
text-decoration-line: none

.playlistPreviewVideoTitle
width: 100%
display: block
overflow: hidden
white-space: nowrap
text-overflow: ellipsis





147 changes: 147 additions & 0 deletions src/renderer/components/ft-community-post/ft-community-post.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
<template>
<div
v-if="!isLoading"
class="outside"
>
<div
class="author-div"
>
<img
:src="'https://'+authorThumbnails[Math.max(0, authorThumbnails.length-1)].url"
ChunkyProgrammer marked this conversation as resolved.
Show resolved Hide resolved
class="communityThumbnail"
>
ChunkyProgrammer marked this conversation as resolved.
Show resolved Hide resolved
<p
id="authorName"
ChunkyProgrammer marked this conversation as resolved.
Show resolved Hide resolved
>
{{ author }}
</p>
<p
id="publishedText"
ChunkyProgrammer marked this conversation as resolved.
Show resolved Hide resolved
>
{{ publishedText }}
</p>
</div>
<p v-html="postText" />
<div
v-if="type === 'image'"
>
<img
:src="postContent.content[Math.max(0, postContent.content.length-1)].url"
Copy link
Collaborator

Choose a reason for hiding this comment

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

This isn't fully working. Check NBC News' post one month ago about Bill Cosby. The picture fails to load on FT but loads on YT.

Copy link
Member

Choose a reason for hiding this comment

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

Oddly the images load if you copy the source url and paste them in a browser. I'm curious as to if this is an issue that'd only appear in dev mode

class="communityImage"
>
ChunkyProgrammer marked this conversation as resolved.
Show resolved Hide resolved
</div>
<div
v-if="type === 'video'"
>
<ft-list-video
:data="data.postContent.content"
appearance=""
/>
</div>
<div
v-if="type === 'poll'"
ChunkyProgrammer marked this conversation as resolved.
Show resolved Hide resolved
>
<div
class="poll-count"
>
{{ postContent.content.totalVotes }}
</div>
<div
v-for="(poll, index) in postContent.content.choices"
:key="index"
>
<div
class="poll-option"
>
<span
class="circle"
/>
<div
class="poll-text"
>
{{ poll }}
</div>
</div>
</div>
</div>
<div
v-if="type === 'playlist'"
class="playlistWrapper"
>
<router-link
class="videoThumbnail"
:to="`/playlist/${postContent.content.playlistId}`"
>
<div
class="imageWrapper"
>
<img
:src="postContent.content.thumbnails[0].thumbnails[0].url"
class="thumbnailImage"
>
ChunkyProgrammer marked this conversation as resolved.
Show resolved Hide resolved
</div>
</router-link>
<div
class="playlistText"
>
<router-link
class="playlistTitle"
:to="`/playlist/${playlistId}`"
>
{{ postContent.content.title }}
</router-link>
<br>
<span
class="playlistAuthor"
>
{{ postContent.content.author }}
-
<span
class="playlistVideoCount"
>
{{ postContent.content.videoCountText.text }}
Videos
</span>
<br>
</span>
<router-link
v-for="video in postContent.content.playlistVideoRenderer "
ChunkyProgrammer marked this conversation as resolved.
Show resolved Hide resolved
:key="video.videoId"
class="playlistPreviewVideos"
:to="`/watch/${video.videoId}`"
>
<span
class="playlistPreviewVideoTitle"
>
{{ video.title }}
</span>
<span>
&#183;
</span>
<span
class="playlistPreviewVideoLength"
>
{{ video.lengthText }}
</span>
<br>
</router-link>
</div>
</div>
<div
class="bottomSection"
>
<span class="likeCount"><font-awesome-icon icon="thumbs-up" /> {{ voteCount }}</span>
<span class="dislikeCount"><font-awesome-icon
id="thumbs-down-icon"
ChunkyProgrammer marked this conversation as resolved.
Show resolved Hide resolved
icon="thumbs-down"
/></span>
<span class="commentCount"><font-awesome-icon
id="comment-count-icon"
ChunkyProgrammer marked this conversation as resolved.
Show resolved Hide resolved
icon="comment"
/> {{ commentCount }}</span>
ChunkyProgrammer marked this conversation as resolved.
Show resolved Hide resolved
</div>
</div>
</template>

<script src="./ft-community-post.js" />
<style scoped src="./ft-community-post.sass" lang="sass" />
3 changes: 3 additions & 0 deletions src/renderer/sass-partials/_ft-list-item.sass
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ $thumbnail-overlay-opacity: 0.85

.thumbnailLink
display: flex
height: 100%
width: 100%

.thumbnailImage
height: 130px
Expand Down Expand Up @@ -208,6 +210,7 @@ $thumbnail-overlay-opacity: 0.85

.thumbnailImage
width: 100%
height: 100%

.title
font-size: 18px
Expand Down
18 changes: 18 additions & 0 deletions src/renderer/views/Channel/Channel.css
Original file line number Diff line number Diff line change
Expand Up @@ -139,3 +139,21 @@
cursor: pointer;
margin-top: 16px;
}

.communityThumbnail {
height: 12%;
width: 12%;
border-radius: 200px 200px 200px 200px;
-webkit-border-radius: 200px 200px 200px 200px;
}

.ft-community-image {
margin-left: auto;
margin-right: auto;
display: block;
}

.community-post-container {
padding-left: 30%;
padding-right: 30%;
}
Loading