-
Notifications
You must be signed in to change notification settings - Fork 184
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
Address comments from PR #403 Improve pool navigation/browsing #650
Open
dekarrin
wants to merge
37
commits into
rr-:master
Choose a base branch
from
dekarrin:update/Ruin0x11/improve-pools
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
8164586
Support sorting post search results by pool post order
Ruin0x11 6fd48dc
Sort by pool by default from pool details page
Ruin0x11 4737739
Thumbnail view in pool list
Ruin0x11 161a393
Add new sort tokens for pools; update API doc
Ruin0x11 eee9b70
Stacked thumbnail appearance for pool list page
Ruin0x11 676a5ff
Retrieve surrounding pool posts in pool search query
Ruin0x11 748f0e1
temp
Ruin0x11 8e8b15a
Route for getting previous/next posts in pool
Ruin0x11 7750e43
Initial implementation of pool navigation inside posts
Ruin0x11 e1c9704
Add pool posts around test
Ruin0x11 28eaf53
Add first/last pool post to pool navigator
Ruin0x11 2ce243d
Merge branch 'old-pool-divergence' into update/Ruin0x11/improve-pools
dekarrin 6a0d574
slap alembic-utils into install process quick and let ci do the work …
dekarrin 719f6dc
Impl post_search_config.py's create_around_query()
dekarrin e397817
temp rearrange server Dockerfile so cache is used for fast dev cycle
dekarrin fa95a98
remove initial pgfunction migration bc endgoal is to not have it
dekarrin 1a54bb3
Merge branch 'update/Ruin0x11/improve-pools' of github.com:dekarrin/s…
dekarrin eabf637
Add todo msg
dekarrin fa14bea
rewire post search config to actual function
dekarrin 1c189fc
fix defaulted abstraction
dekarrin 85f012b
Rewrite get_pool_posts_around to not use raw sql
dekarrin dde52f1
Fix pool post serializer
dekarrin 75840f2
Remove unneeded files
dekarrin fdb36ed
Remove unneeded new SQL function lines
dekarrin 75d9fb2
Restore dev env convenience changes
dekarrin 2ea36ce
Restore more dev env convenience changes
dekarrin cb0377a
Spacing
dekarrin 5607664
Update dockerfile to cache package installs before copying in code
dekarrin 076a3a0
Don't copy codebase twice in dockerfile
dekarrin e7031b3
Fix tests/func/test_get_pools_around to use new format
dekarrin d0f6a36
Make verify_unpage for test_pool_search ignore order unless specified
dekarrin 0955ed0
Remove redundant no-query tests from pool search sort tests
dekarrin 674979c
Fix test_pool_search_config.test_sort_by_category to assume default l…
dekarrin 2ff6d74
Remove unnecessary comma from pool list controller
dekarrin 4ddbbcb
Spacing in server Dockerfile
dekarrin dff6b65
Tidy up unused symbols, spacing
dekarrin ebb46e5
apply pre-commit
dekarrin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
ARG BUILDPLATFORM=linux/amd64 | ||
FROM --platform=$BUILDPLATFORM node:lts as builder | ||
WORKDIR /opt/app | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
@import colors | ||
|
||
.pool-navigator-container | ||
padding: 0 | ||
margin: 0 auto | ||
|
||
.pool-info-wrapper | ||
box-sizing: border-box | ||
width: 100% | ||
margin: 0 0 1em 0 | ||
display: flex | ||
padding: 0.5em 1em | ||
border: 1px solid $pool-navigator-border-color | ||
background: $pool-navigator-background-color | ||
&.active | ||
font-weight: bold | ||
font-size: 1.10em; | ||
padding: 0.58em 1em | ||
|
||
.pool-name | ||
flex: 1 1; | ||
text-align: center; | ||
overflow: hidden; | ||
white-space: nowrap; | ||
-o-text-overflow: ellipsis; | ||
text-overflow: ellipsis; | ||
|
||
.first, .last | ||
flex-basis: 1em; | ||
|
||
.first, .prev, .next, .last | ||
flex: 0 1; | ||
margin: 0 .25em; | ||
white-space: nowrap; | ||
|
||
|
||
.darktheme .pool-navigator-container | ||
background: $pool-navigator-header-background-color-darktheme |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.pool-navigators>ul | ||
list-style-type: none | ||
margin: 0 | ||
padding: 0 | ||
|
||
>li | ||
margin-bottom: 1em | ||
&:last-child | ||
margin-bottom: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,7 +65,7 @@ $cancel-button-color = tomato | |
img | ||
width: 100% | ||
height: 100% | ||
|
||
video | ||
width: 100% | ||
height: 100% | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<div class='pool-navigator-container'> | ||
<div class='pool-info-wrapper <%= ctx.isActivePool ? "active" : "" %>'> | ||
<span class='first'> | ||
<% if (ctx.canViewPosts && ctx.firstPost) { %> | ||
<a class='<%- ctx.linkClass %>' href='<%= ctx.getPostUrl(ctx.firstPost.id, ctx.parameters) %>'> | ||
<% } %> | ||
« | ||
<% if (ctx.canViewPosts && ctx.firstPost) { %> | ||
</a> | ||
<% } %> | ||
</span> | ||
<span class='prev'> | ||
<% if (ctx.canViewPosts && ctx.prevPost) { %> | ||
<a class='<%- ctx.linkClass %>' href='<%= ctx.getPostUrl(ctx.prevPost.id, ctx.parameters) %>'> | ||
<% } %> | ||
‹ prev | ||
<% if (ctx.canViewPosts && ctx.prevPost) { %> | ||
</a> | ||
<% } %> | ||
</span> | ||
<span class='pool-name'> | ||
<% if (ctx.canViewPools) { %> | ||
<a class='<%- ctx.linkClass %>' href='<%= ctx.formatClientLink("pool", ctx.pool.id) %>'> | ||
<% } %> | ||
Pool: <%- ctx.pool.names[0] %> | ||
<% if (ctx.canViewPools) { %> | ||
</a> | ||
<% } %> | ||
</span> | ||
<span class='next'> | ||
<% if (ctx.canViewPosts && ctx.nextPost) { %> | ||
<a class='<%- ctx.linkClass %>' href='<%= ctx.getPostUrl(ctx.nextPost.id, ctx.parameters) %>'> | ||
<% } %> | ||
next › | ||
<% if (ctx.canViewPosts && ctx.nextPost) { %> | ||
</a> | ||
<% } %> | ||
</span> | ||
<span class='last'> | ||
<% if (ctx.canViewPosts && ctx.lastPost) { %> | ||
<a class='<%- ctx.linkClass %>' href='<%= ctx.getPostUrl(ctx.lastPost.id, ctx.parameters) %>'> | ||
<% } %> | ||
» | ||
<% if (ctx.canViewPosts && ctx.lastPost) { %> | ||
</a> | ||
<% } %> | ||
</span> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<div class='pool-navigators'> | ||
<ul> | ||
</ul> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,19 @@ | ||
<div class='pool-list table-wrap'> | ||
<% if (ctx.postFlow) { %><div class='pool-list post-flow'><% } else { %><div class='pool-list'><% } %> | ||
<% if (ctx.response.results.length) { %> | ||
<table> | ||
<thead> | ||
<th class='names'> | ||
<% if (ctx.parameters.query == 'sort:name' || !ctx.parameters.query) { %> | ||
<a href='<%- ctx.formatClientLink('pools', {query: '-sort:name'}) %>'>Pool name(s)</a> | ||
<% } else { %> | ||
<a href='<%- ctx.formatClientLink('pools', {query: 'sort:name'}) %>'>Pool name(s)</a> | ||
<ul> | ||
<% for (let pool of ctx.response.results) { %> | ||
<li data-pool-id='<%= pool.id %>'> | ||
<a class='thumbnail-wrapper' href='<%= ctx.canViewPools ? ctx.formatClientLink("pool", pool.id) : "" %>'> | ||
<% if (ctx.canViewPosts) { %> | ||
<%= ctx.makePoolThumbnails(pool.posts, ctx.postFlow) %> | ||
<% } %> | ||
</th> | ||
<th class='post-count'> | ||
<% if (ctx.parameters.query == 'sort:post-count') { %> | ||
<a href='<%- ctx.formatClientLink('pools', {query: '-sort:post-count'}) %>'>Post count</a> | ||
<% } else { %> | ||
<a href='<%- ctx.formatClientLink('pools', {query: 'sort:post-count'}) %>'>Post count</a> | ||
<% } %> | ||
</th> | ||
<th class='creation-time'> | ||
<% if (ctx.parameters.query == 'sort:creation-time') { %> | ||
<a href='<%- ctx.formatClientLink('pools', {query: '-sort:creation-time'}) %>'>Created on</a> | ||
<% } else { %> | ||
<a href='<%- ctx.formatClientLink('pools', {query: 'sort:creation-time'}) %>'>Created on</a> | ||
<% } %> | ||
</th> | ||
</thead> | ||
<tbody> | ||
<% for (let pool of ctx.response.results) { %> | ||
<tr> | ||
<td class='names'> | ||
<ul> | ||
<% for (let name of pool.names) { %> | ||
<li><%= ctx.makePoolLink(pool.id, false, false, pool, name) %></li> | ||
<% } %> | ||
</ul> | ||
</td> | ||
<td class='post-count'> | ||
<a href='<%- ctx.formatClientLink('posts', {query: 'pool:' + pool.id}) %>'><%- pool.postCount %></a> | ||
</td> | ||
<td class='creation-time'> | ||
<%= ctx.makeRelativeTime(pool.creationTime) %> | ||
</td> | ||
</tr> | ||
<% } %> | ||
</tbody> | ||
</table> | ||
</a> | ||
<div class='pool-name'> | ||
<%= ctx.makePoolLink(pool.id, false, false, pool, name) %> | ||
</div> | ||
</li> | ||
<% } %> | ||
<%= ctx.makeFlexboxAlign() %> | ||
</ul> | ||
<% } %> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Were the changes to .gitignore here intentionally included or are they specific to your setup?