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

Single page application feature branch #2851

Merged
merged 123 commits into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
123 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
c3d79bd
feat: Use Global Route Loader
anshg1214 Mar 21, 2024
c2ede55
feat: Add React-Query
anshg1214 Mar 21, 2024
9ba6489
feat: Add ReactQuery to Entity Pages
anshg1214 Mar 21, 2024
c9ab656
fix: Query key
anshg1214 Mar 22, 2024
53e9406
feat: Add Param to include/exclude searchParams
anshg1214 Mar 23, 2024
25615ea
feat: Add react-query to more routes
anshg1214 Mar 23, 2024
3ba3d2d
feat: Add React Query for Year in Music
anshg1214 Mar 23, 2024
0e352da
fix: Reload the page on disabling external service
anshg1214 Mar 25, 2024
1f12074
feat: Use React-query for dashboard
anshg1214 Mar 28, 2024
d41bd83
fix: User dashboard
anshg1214 Mar 30, 2024
10c796f
feat: Add React-Query for more pages
anshg1214 Mar 30, 2024
2ed584c
test: Disable Listens tests
anshg1214 Mar 30, 2024
1c6e0a5
feat: Add React Query Devtools to production
anshg1214 Apr 2, 2024
55df712
refactor: SocketIO connection
anshg1214 Apr 3, 2024
02ee581
refactor: Loader
anshg1214 Apr 3, 2024
24600ae
feat: Make review changes
anshg1214 Apr 9, 2024
71cedb0
fix: Deleting listens
anshg1214 Apr 10, 2024
ca23a40
Merge pull request #2769 from metabrainz/spa-entity-pages
MonkeyDo Apr 12, 2024
ef92c03
fix: Refetch on new listens
anshg1214 Apr 12, 2024
4fee7e4
fix: SetState function
anshg1214 Apr 12, 2024
cd1ca33
Merge branch 'master' of https://github.com/metabrainz/listenbrainz-s…
anshg1214 Apr 19, 2024
d1919c4
Merge remote-tracking branch 'origin/single-page-app' into react-query
MonkeyDo Apr 23, 2024
1b70ec5
Fix useQuery typescript types
MonkeyDo Apr 23, 2024
9f9c2cf
Fix Dashboard useQuery types
MonkeyDo Apr 23, 2024
8601b4e
Revert change in MusicNeighborhood
MonkeyDo Apr 23, 2024
5c0a7e2
Add esling disable rule back
MonkeyDo Apr 23, 2024
38999ac
Fix MusicNeighborhood page
MonkeyDo Apr 23, 2024
8b8da7f
Merge pull request #2822 from metabrainz/react-query
MonkeyDo Apr 23, 2024
12b97c9
Merge branch 'master' into single-page-app
MonkeyDo Apr 23, 2024
2d104f2
Remove role attribute from main container element
MonkeyDo Apr 23, 2024
03670f2
refactor: formatting
anshg1214 Apr 24, 2024
fc1308d
fix: Use Anchor tag to login since we're sending the request to the f…
anshg1214 Apr 24, 2024
8d6b678
Fix Dashboard listen deletion
MonkeyDo Apr 24, 2024
e04551b
Update anchor tags to Link component
MonkeyDo Apr 24, 2024
1e0c9cb
Merge branch 'master' into spa-improvement
MonkeyDo Apr 24, 2024
7eafd8f
Remove profile blueprint
MonkeyDo Apr 24, 2024
85c4c4e
Merge branch 'master' into single-page-app
MonkeyDo Apr 24, 2024
77a003e
fix: Delete Account route
anshg1214 Apr 24, 2024
6fde33c
fix: Overflowing image on CAC Page
anshg1214 Apr 24, 2024
a26f3cb
refactor: Fix PEP8 Issue
anshg1214 Apr 24, 2024
b4c59c8
refactor: Remove whitespace
anshg1214 Apr 24, 2024
fd6bafc
Merge pull request #2848 from metabrainz/spa-improvement
anshg1214 Apr 25, 2024
6c0c6af
Move NiceModalProvider and ToastContainer in Layout component
MonkeyDo Apr 25, 2024
0a3b388
Close CBReviewModal when clicking on link
MonkeyDo Apr 25, 2024
8a9cebf
Dismiss modal backdrop: Try again
MonkeyDo Apr 25, 2024
7c96a4e
fix: Modal Close on navigating
anshg1214 Apr 25, 2024
b46db1a
Formatting
MonkeyDo Apr 25, 2024
eccbdca
Release/RG -> Album: replace navigation history
MonkeyDo Apr 25, 2024
f9f6d0b
Replace navigation history for more redirects
MonkeyDo Apr 25, 2024
173e514
Adjust container CSS
MonkeyDo Apr 25, 2024
71219d9
Missing dependencies
MonkeyDo Apr 25, 2024
cb03da1
AppleMusicPlayer make anchor into Link
MonkeyDo Apr 25, 2024
38e2bfc
feat: Migrate to Link Component
anshg1214 Apr 25, 2024
e2f63bf
feat: Add Link Component to BrainzPlayer
anshg1214 Apr 25, 2024
4d56d7b
refactor: lint
anshg1214 Apr 25, 2024
e18d8da
refactor: format
anshg1214 Apr 25, 2024
32b702c
refactor: format
anshg1214 Apr 26, 2024
a41bbdd
feat: Refactor Protected Routes Layout
anshg1214 Apr 26, 2024
90c9c79
fix: misc
anshg1214 Apr 26, 2024
b7f950e
refactor: Use Link Component instead of anchor tag
anshg1214 Apr 26, 2024
09fa11d
Add role=main to entity pages
MonkeyDo Apr 26, 2024
1038ca5
Fix order of providers in test util
MonkeyDo Apr 26, 2024
0692c4b
Merge branch 'master' into single-page-app
MonkeyDo Apr 26, 2024
06fd48f
fix: Test
anshg1214 Apr 26, 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
5 changes: 4 additions & 1 deletion frontend/css/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,15 @@ pre code.hljs {
}

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

/* Footer */
.footer {
padding-left: 25px;
width: 100%;
background: #fff;
color: #000000;
padding-bottom: 10px;
Expand Down
22 changes: 14 additions & 8 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 @@ -155,14 +159,14 @@ body {
}
}
/* main content */
> [class*="container"] {
.container-react {
// Leave some space for BrainzPlayer
padding-bottom: @brainzplayer-height;

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

div[role="main"] {
[role="main"] {
max-width: @max-content-width;
margin-left: auto;
margin-right: auto;
Expand All @@ -171,8 +175,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 +221,15 @@ body {
align-items: center;
}
}
> [class*="container"] {
.container-react {
&,
div[role="main"] {
.container-react-main {
width: 100%;
}
}
#react-container {
display: initial;
}
}
}

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>
</>
);
}