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

Redesign Recommendations page #2503

Merged
merged 53 commits into from
Jul 24, 2023
Merged
Show file tree
Hide file tree
Changes from 45 commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
89e3237
Recs: Create rec playlist details card
MonkeyDo May 30, 2023
04a743b
Recs: Reimplement recommendations page
MonkeyDo May 30, 2023
6b884c5
Recs: Add BrainzPlayer
MonkeyDo May 30, 2023
9c85852
Recs: Add background images
MonkeyDo May 31, 2023
ebc1d0e
Recs: Allow saving rec playlists
MonkeyDo May 31, 2023
9a30f02
Recs: Modify fancy CSS background cycler
MonkeyDo May 31, 2023
fcefcec
Add support for /user/<user>/playlists/recommendations endpoint
mayhem May 31, 2023
d7418be
Recs: Improve how we display playlists
MonkeyDo May 31, 2023
f61c8ed
Merge branch 'recommendations-redesign' of https://github.com/metabra…
MonkeyDo May 31, 2023
df2c860
Add simple tests for the new user recommendationes endpoint.
mayhem May 31, 2023
d5f850c
Recs: Use get_recommendation_playlists_for_user in recs web view
MonkeyDo May 31, 2023
219c383
Merge branch 'recommendations-redesign' of https://github.com/metabra…
MonkeyDo May 31, 2023
3f1715f
Recs: Improve detection of old recs playlists
MonkeyDo May 31, 2023
7b36032
Recs: Improve mobile device layout
MonkeyDo May 31, 2023
bb8b86b
Recs: Improve CSS
MonkeyDo Jun 1, 2023
ac846a4
Recs: clicking on save button doesn't select playlist
MonkeyDo Jun 1, 2023
2b1cebe
Recs: Use button element for top cards
MonkeyDo Jun 1, 2023
8513e6f
Recs: use dragscroll on playlist cards masonry element
MonkeyDo Jun 1, 2023
f16c415
Recs: More UI refining
MonkeyDo Jun 1, 2023
1ca122c
Recs: Improve dragscroll mechanism
MonkeyDo Jun 1, 2023
fc0d16c
Recs: fix overflow gradient
MonkeyDo Jun 1, 2023
62b4d0c
Recs: Auto-select the weekly jams playlist
MonkeyDo Jun 2, 2023
83d1b73
Recs: Fix inital playlist load
MonkeyDo Jun 2, 2023
2a2cd06
Recs: image fallback when no playlists to show
MonkeyDo Jun 2, 2023
d0f1ae6
Recs: "duplicate" when on another user's profile
MonkeyDo Jun 2, 2023
810b5f7
Recs: rename tab to "Created for you"
MonkeyDo Jun 2, 2023
e66ae08
Recs: Target correct element when clicking
MonkeyDo Jun 2, 2023
15cfd70
Recs: Rename Weekly New Jams -> Weekly Exploration
MonkeyDo Jun 2, 2023
27f5dd4
Rename weekly-new-jams to weekly-exploration
mayhem Jun 2, 2023
944287d
Merge branch 'recommendations-redesign' of github.com:metabrainz/list…
mayhem Jun 2, 2023
d6e2283
Show playlists from troi-bot and listenbrainz
mayhem Jun 2, 2023
d743295
Recs: Fix page title
MonkeyDo Jun 2, 2023
cb098b9
Recs: Make daily jams background blue
MonkeyDo Jun 2, 2023
26c390b
Recs: Improve scroll indicator
MonkeyDo Jun 2, 2023
f51c967
Recs: implement aerozol feedback
MonkeyDo Jun 7, 2023
a3f5fd9
Recs: Get user feedback
MonkeyDo Jun 9, 2023
80e8596
Recs: optional deletion and props for PlaylistItemCard
MonkeyDo Jun 9, 2023
983e331
Recs: Allow users to reorder tracks
MonkeyDo Jun 9, 2023
627febc
Recs: UI tweaks
MonkeyDo Jun 9, 2023
cedb983
Recs: add missing key prop
MonkeyDo Jun 9, 2023
57f1d1e
Recs: small CSS tweak
MonkeyDo Jun 9, 2023
ff1a922
Recs: Fix feedback fetching by MBIDs
MonkeyDo Jun 9, 2023
5fa7784
Recs: CSS tweak for card title
MonkeyDo Jun 9, 2023
95a4c3a
Lint less files
MonkeyDo Jun 9, 2023
b78eede
D'oh.
MonkeyDo Jun 9, 2023
ace0716
Fix type definition of playlists for collaborators field
amCap1712 Jun 12, 2023
361b209
Minor fixes for the RecommendationsPage
amCap1712 Jun 12, 2023
71cdf75
Fix displaying list of playlist collaborators
amCap1712 Jun 12, 2023
9598423
Show expiration timer on recommendation playlists
MonkeyDo Jun 29, 2023
df2e9a9
Linting less file
MonkeyDo Jun 29, 2023
ecd1c79
Recs: Add button to inspect playlist code
MonkeyDo Jun 29, 2023
46aebd1
Missing carriage return
MonkeyDo Jun 29, 2023
66831ae
Merge branch 'master' into recommendations-redesign
MonkeyDo Jul 24, 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
3 changes: 3 additions & 0 deletions frontend/css/listens-page.less
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,9 @@
height: 100%;
}
.listen-card {
&.card {
height: initial;
}
margin-bottom: 7px;
a:focus,
a:hover {
Expand Down
16 changes: 16 additions & 0 deletions frontend/css/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -337,3 +337,19 @@ pre code.hljs {
.input-group > .input-group-btn > .btn {
line-height: 2em;
}

.btn-icon {
padding: 0.5em;
font-size: 1.5em;
width: 2em;
height: 2em;
line-height: 1em;
border-radius: 5px;
& + .btn-icon {
margin-left: 0.4em;
}
}

.btn-rounded {
border-radius: 3em;
}
172 changes: 171 additions & 1 deletion frontend/css/recommendation-page.less
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,174 @@
#recommendations {
&:extend(#listens);
}
/* stylelint-enable */
/* stylelint-enable */

.playlists-masonry-container {
position: relative;
// hide overflow behind button with gradient to indicate there's more
.nav-button {
position: absolute;
top: 0;
bottom: 0;
width: 55px;
border: none;
font-size: 2em;
color: @light-grey;
z-index: 1;
opacity: 1;
transition: opacity 300ms linear;
&.backward {
background: linear-gradient(to right, @white 10%, transparent);
text-align: left;
left: 0;
}
&.forward {
background: linear-gradient(to left, @white 10%, transparent);
right: 0;
text-align: right;
}
}
&.scroll-start .nav-button.backward,
&.scroll-end& .nav-button.forward {
opacity: 0;
pointer-events: none;
}
}
.playlists-masonry {
width: 100%;
display: grid;
grid-gap: 1em;
grid-auto-rows: 150px;
grid-auto-columns: 300px;
grid-auto-flow: column;
overflow-x: scroll;
overflow-y: hidden;
scroll-snap-type: x proximity;
&.dragging {
scroll-snap-type: none;
}

> * {
min-width: 260px;
padding: 1em;
display: flex;
align-items: flex-end;
background-size: cover;
background-color: #b2d4b0;
background-position: center;
border: none;
scroll-snap-align: start;
filter: unset;
transition: all 300ms ease-out;
&:hover {
filter: saturate(1.4);
.title {
margin-bottom: 5px;
}
}
&.selected {
border: 5px solid @blue;
border-radius: 3px;
}
.title {
font-family: Roboto, sans-serif;
font-weight: 900;
font-size: 2em;
line-height: 1.1em;
color: @blue;
transition: margin-bottom 300ms ease-out;
margin-bottom: 0px;
text-align: left;
border: none;
max-width: 80%;
}
.btn {
margin-left: auto;
}
// Magic background image cycler
/* stylelint-disable */
each(range(3), {
//We only have three backgrounds available for green (#1 is only used for weekly jams)
&.green:nth-of-type(3n+@{value}) {
@bgValue: (@value + 1);
background-image: url("../img/recommendations/green-@{bgValue}.svg");
}
});
each(range(4), {
&.red:nth-of-type(4n+@{value}) {
background-image: url("../img/recommendations/red-@{value}.svg");
}
});
each(range(4), {
&.blue:nth-of-type(4n+@{value}) {
background-image: url("../img/recommendations/blue-@{value}.svg");
}
});
/* stylelint-enable */

&:nth-child(1 of .weekly-jams) {
// Make first weekly-jams element bigger and placed at the start
min-width: 320px;
grid-column-start: 1;
grid-column-end: 3;
grid-row-start: 1;
grid-row-end: 3;
background-image: url("../img/recommendations/green-1.svg");
.title {
width: 5em;
font-size: 4em;
}
&:hover .title {
margin-bottom: 10px;
}
}
&:not(:nth-child(1 of .weekly-jams)) button {
aspect-ratio: 1;
padding: 3px 7px;
.button-text {
display: none;
}
}
}

@media (max-width: @screen-sm) {
grid-auto-columns: unset;
}
}

#selected-playlist {
display: flex;
flex-wrap: wrap-reverse;
align-items: flex-end;
gap: 1em;
margin-top: 2em;
border-top: 1px solid @light;
padding-top: 2em;

.playlist-items {
flex: 2;
flex-basis: 350px;
}
.playlist-settings {
width: 350px;
flex: 1;
flex-basis: 300px;
padding: 1em;
overflow: hidden;

.playlist-settings-header {
background: @blue;
color: @white;
padding: 1em;
margin: -1em -1em 0;
.title {
margin-top: 0.6em;
font-size: 1.3em;
font-weight: 600;
}
}
.buttons {
padding: 0.7em 0;
}
}
}
39 changes: 39 additions & 0 deletions frontend/img/recommendations/blue-1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions frontend/img/recommendations/blue-2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions frontend/img/recommendations/blue-3.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions frontend/img/recommendations/blue-4.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions frontend/img/recommendations/green-1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 39 additions & 0 deletions frontend/img/recommendations/green-2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading