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

Migrate Entity Pages to SPA #2769

Merged
merged 60 commits into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from 40 commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
65c8808
feat: Add About pages
anshg1214 Feb 8, 2024
dcc88e2
feat: Add More pages to SPA
anshg1214 Feb 8, 2024
910b1c6
feat: Add Helmet
anshg1214 Feb 9, 2024
9866030
feat: Add RouteLoader
anshg1214 Feb 9, 2024
a0cd3f5
feat: add entity pages
anshg1214 Feb 9, 2024
690647c
refactor: Cleanup and add error boundary
anshg1214 Feb 9, 2024
34cce0b
fix: PEP8 Issues
anshg1214 Feb 9, 2024
8c9fdb4
feat: Add Playlist page
anshg1214 Feb 10, 2024
e79c3dd
feat: Add MetadataViewerPage
anshg1214 Feb 10, 2024
e60192e
Merge branch 'master' of https://github.com/metabrainz/listenbrainz-s…
anshg1214 Feb 12, 2024
0cb7362
Merge branch 'migrate-user-feed-to-spa' of https://github.com/metabra…
anshg1214 Feb 13, 2024
1dc70aa
feat: Replace anchor tags by Link
anshg1214 Feb 13, 2024
34fcee2
refactor: Cleanup
anshg1214 Feb 13, 2024
5b61de0
feat: Merge Settings SPA
anshg1214 Feb 14, 2024
9e9664b
fix: PEP8 issue
anshg1214 Feb 15, 2024
d530a6d
feat: Switch Layout from HTML to React
anshg1214 Feb 15, 2024
935834c
Merge branch 'master' of https://github.com/metabrainz/listenbrainz-s…
anshg1214 Feb 15, 2024
a98ef08
feat: migrate homepage to SPA
anshg1214 Feb 15, 2024
a4b69c4
refactor: misc
anshg1214 Feb 15, 2024
cce8cc8
refactor: cleanup
anshg1214 Feb 15, 2024
7b7ec68
feat: Move Login to SPA
anshg1214 Feb 16, 2024
85b774e
feat: Add Layout for ErrorBoundary
anshg1214 Feb 16, 2024
286548d
fix: Searching user reloads page
anshg1214 Feb 16, 2024
14b1fdb
feat: Close sidebar on navigating pages
anshg1214 Feb 16, 2024
0b12d3e
refactor: misc
anshg1214 Feb 19, 2024
b97e6a2
Merge branch 'master' into spa-entity-pages
anshg1214 Feb 19, 2024
3cbbbdf
fix: Server Tests
anshg1214 Feb 21, 2024
01e007e
Merge branch 'master' of https://github.com/metabrainz/listenbrainz-s…
anshg1214 Feb 21, 2024
129dfd2
test: Fix settings server tests
anshg1214 Feb 21, 2024
d902993
feat: migrate AI Brainz to React Component
anshg1214 Feb 23, 2024
9be1b54
feat: Migrate Player and recommendations page to SPA
anshg1214 Feb 23, 2024
cbe808f
feat: fix more tests
anshg1214 Feb 23, 2024
0fa2615
Merge branch 'master' of https://github.com/metabrainz/listenbrainz-s…
anshg1214 Feb 28, 2024
c19e22c
Merge branch 'migrate-user-feed-to-spa' of https://github.com/metabra…
anshg1214 Feb 28, 2024
89a62bc
feat: Lazy Load routes
anshg1214 Feb 28, 2024
6fa6659
test: Fix all frontent tests
anshg1214 Feb 29, 2024
c9703b5
Merge branch 'master' into spa-entity-pages
anshg1214 Mar 1, 2024
53e4d80
fix: PEP8 Issues
anshg1214 Mar 2, 2024
faab937
fix: tests
anshg1214 Mar 2, 2024
d3a1c03
fix: Tests
anshg1214 Mar 2, 2024
13cd9b2
feat: Transition from anchor tags to Link component
anshg1214 Mar 17, 2024
997e11b
feat: Use NavLink to cleanup codebase
anshg1214 Mar 17, 2024
3b6cda2
test: Add BrowserRouter in `renderWithProviders`
anshg1214 Mar 17, 2024
b75b3c1
refactor: Revert Bootstrap css changes
anshg1214 Mar 17, 2024
ca876d4
feat: Conditionally render Homepage
anshg1214 Mar 17, 2024
5a4847f
refactor: Simplify Active Label logic
anshg1214 Mar 17, 2024
de4a65b
Merge branch 'master' of https://github.com/metabrainz/listenbrainz-s…
anshg1214 Mar 17, 2024
844a64d
fix: tests
anshg1214 Mar 17, 2024
cd0fcf9
tests: Fix server tests
anshg1214 Mar 18, 2024
0c5c357
feat: Redirect from player page to entity page
anshg1214 Mar 19, 2024
ad6bd11
feat: Migrate API Auth page to SPA
anshg1214 Mar 19, 2024
107a62e
refactor: Add Types to Routes
anshg1214 Mar 19, 2024
02babe8
feat: Migrate API routes
anshg1214 Mar 19, 2024
a955b24
refactor: cleanup
anshg1214 Mar 19, 2024
9043a4f
feat: Migrate Anchor Tags to Link Component to prevent rerendering
anshg1214 Mar 19, 2024
e238152
Merge branch 'master' of https://github.com/metabrainz/listenbrainz-s…
anshg1214 Mar 19, 2024
58703fb
Fix artist page state not updating
MonkeyDo Mar 20, 2024
1554967
Change anchor tag to Link in ReleaseCard
MonkeyDo Mar 20, 2024
1bd6026
refactor: Cleanup
anshg1214 Mar 20, 2024
0e352da
fix: Reload the page on disabling external service
anshg1214 Mar 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion frontend/css/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,14 @@ pre code.hljs {
}

// Content Wrapper
.wrapper {
.container-react-main {
min-height: 70vh;
}

/* Footer */
.footer {
padding-left: 25px;
width: 100%;
background: #fff;
color: #000000;
padding-bottom: 10px;
Expand Down
23 changes: 14 additions & 9 deletions frontend/css/new-navbar.less
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,12 @@
@gradient-orange: #ffa500;

body {
display: flex;
> nav[role="navigation"] {
#react-container {
display: flex;
width: 100%;
}

nav[role="navigation"] {
max-width: @sidenav-width;

#side-nav {
Expand Down Expand Up @@ -154,15 +158,14 @@ body {
}
}
/* main content */
> :not(nav) {
margin-left: 1em;
.container-react {
// Leave some space for BrainzPlayer
padding-bottom: @brainzplayer-height;

width: 100%; // fallback
width: calc(100% - @sidenav-width);

div[role="main"] {
.container-react-main {
max-width: @max-content-width;
margin-left: auto;
margin-right: auto;
Expand All @@ -171,8 +174,7 @@ body {

/* Styles for mobile devices */
@media (max-width: @offscreen-sidenav-breakpoint) {
display: initial;
> nav[role="navigation"] {
nav[role="navigation"] {
max-width: unset;
#side-nav {
transition: transform 0.3s ease-in-out;
Expand Down Expand Up @@ -218,12 +220,15 @@ body {
align-items: center;
}
}
> :not(nav) {
.container-react {
&,
div[role="main"] {
.container-react-main {
width: 100%;
}
}
#react-container {
display: initial;
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion frontend/css/theme/bootstrap/grid.less
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
// Utilizes the mixin meant for fixed width containers, but without any defined
// width for fluid, full width layouts.

.container-fluid {
MonkeyDo marked this conversation as resolved.
Show resolved Hide resolved
.container-react-main {
.container-fixed();
}

Expand Down
4 changes: 2 additions & 2 deletions frontend/css/theme/bootstrap/jumbotron.less
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
}

.container &,
.container-fluid & {
.container-react & {
border-radius: @border-radius-large; // Only round corners at higher resolutions if contained in a container
}

Expand All @@ -39,7 +39,7 @@
padding-bottom: (@jumbotron-padding * 1.6);

.container &,
.container-fluid & {
.container-react & {
padding-left: (@jumbotron-padding * 2);
padding-right: (@jumbotron-padding * 2);
}
Expand Down
4 changes: 2 additions & 2 deletions frontend/css/theme/bootstrap/navbar.less
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
// When a container is present, change the behavior of the header and collapse.

.container,
.container-fluid {
.container-react-main {
> .navbar-header,
> .navbar-collapse {
margin-right: -@navbar-padding-horizontal;
Expand Down Expand Up @@ -178,7 +178,7 @@

@media (min-width: @grid-float-breakpoint) {
.navbar > .container &,
.navbar > .container-fluid & {
.navbar > .container-react & {
margin-left: -@navbar-padding-horizontal;
}
}
Expand Down
113 changes: 113 additions & 0 deletions frontend/js/src/about/About.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
import * as React from "react";

export default function About() {
return (
<>
<h2 className="page-title">Goals</h2>
<p>The ListenBrainz project has a number of goals:</p>
<ol>
<li>
<b>A public store of your listen history.</b> We feel that a listen
history has a tremendous amount of personal value and in aggregate has
a huge amount of value for developers who wish to create better music
technologies, like recommendation systems.
</li>
<li>
<b>A permanent store of your listen history.</b> MetaBrainz, the
non-profit that runs <a href="https://musicbrainz.org">MusicBrainz</a>{" "}
and ListenBrainz has a long history of curating and making data
available to the public in a useful and meaningful manner. We promise
to safeguard your listen history permanently.
</li>
<li>
<b>
To make data dumps of this listen history available for download.
</b>{" "}
We want everyone who is interested in this data to have access to the
data and to use it in any manner they wish.
</li>
<li>
<b>To share listen histories in a distributed fashion.</b> We plan to
allow anyone to connect to ListenBrainz and to tap into a live feed of
listen data as we receive it. We hope that Last.fm will work with us
to make an interconnection with Last.fm possible. We welcome anyone
scrobbling to us and we plan to share the listens shared with us to
anyone else who wants them. We envision smaller music communities with
a specific focus to install their own ListenBrainz server to collect
listen data for their specific focus. We hope that these smaller
communities will also share their data in the same manner in which we
share our data.
</li>
</ol>
<h3>Anti-goals</h3>
<p>
The project also has a number of anti-goals (things it doesn&apos;t try
to be):
</p>
<ol>
<li>
<b>A store for people&apos;s private listen history.</b> The point of
this project is to build a public, shareable store of listen data. As
we build out our sharing features, building a private listen store
will become possible, but that is not part of our goals.
</li>
<li>
<b>A closed platform.</b> We aim to make everything open and to
encourage a community of sharing and participation.
</li>
</ol>
<h2 className="page-title">Roadmap</h2>
We&apos;ve put together a very rough roadmap for this project:
<h3>Short term</h3>
<ul>
<li>Work to improve and extend the user data graphing features.</li>
</ul>
<h3>Medium term</h3>
<ul>
<li>
Start working on an open source recommendation engine using data from
ListenBrainz, <a href="https://acousticbrainz.org">AcousticBrainz</a>{" "}
and <a href="https://musicbrainz.org">MusicBrainz</a>.
</li>
</ul>
<h3>Long term</h3>
<ul>
<li>
Total world domination. What other goals are open source projects
allowed to have?
</li>
</ul>
<br />
<p>
If you have any ideas that should be on our roadmap, please{" "}
<a href="https://metabrainz.org/contact">let us know</a>!
</p>
<h2 className="page-title">Contributing to ListenBrainz</h2>
<h3>Donating</h3>
<p>
Listenbrainz is a free open source project that is not run for profit.
If you would like to help the project out financially, consider{" "}
<a href="https://metabrainz.org/donate">donating</a> to the MetaBrainz
Foundation.
</p>
<h3>Developers</h3>
<p>
ListenBrainz is in its infancy and we need a lot of help to implement
more features and to debug the existing features. If you feel like
helping out and have experience with Python, Postgres and Redis,
we&apos;d love some help.
</p>
<p>
Have a look at the{" "}
<a href="https://github.com/metabrainz/listenbrainz-server">
GitHub repository
</a>{" "}
for this project to get started. You may also consider heading to our
IRC channel #metabrainz on irc.libera.chat and asking people there what
should be worked on next. Finally, we also have a bug tracker that keeps
track of our{" "}
<a href="http://tickets.musicbrainz.org/browse/LB">current issues</a>.
</p>
</>
);
}