Skip to content

Channels: Fix community tab#5183

Merged
syeopite merged 1 commit intoiv-org:masterfrom
Fijxu:community-tab-fix
Feb 26, 2025
Merged

Channels: Fix community tab#5183
syeopite merged 1 commit intoiv-org:masterfrom
Fijxu:community-tab-fix

Conversation

@Fijxu
Copy link
Copy Markdown
Member

@Fijxu Fijxu commented Feb 18, 2025

May close #5182

image

API works well too.

If I need to change anything, just tell me

@Fijxu Fijxu requested review from a team and SamantazFox as code owners February 18, 2025 22:26
private KNOWN_TABS = {
"home", "videos", "shorts", "streams", "podcasts",
"releases", "playlists", "community", "channels", "about",
"posts",
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Here I didn't replace "community" by "posts". I left it as a fallback.

@ChunkyProgrammer
Copy link
Copy Markdown
Contributor

ChunkyProgrammer commented Feb 24, 2025

Suggestion: Since the url didn't change and just the text, maybe this can be handled similarly to how channel live tab is handled? (1 ternary statement that changes live to streams, in this case change post to community).

tab_names = tabs_json.as_a.compact_map do |entry|
name = entry.dig?("tabRenderer", "title").try &.as_s.downcase
# This is a small fix to not add extra code on the HTML side
# I.e, the URL for the "live" tab is .../streams, so use "streams"
# everywhere for the sake of simplicity
(name == "live") ? "streams" : name
end

@syeopite syeopite merged commit 58ad848 into iv-org:master Feb 26, 2025
8 checks passed
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.

[Bug] Community tab disappeared from channels information

3 participants