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

LB-1281: Link all listens from the same album #2956

Merged
merged 50 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
adb648f
Create reusable Accordion component
MonkeyDo Aug 1, 2024
ce92917
Group and display unmatched listens by group
MonkeyDo Aug 1, 2024
a6ae755
Create multi-listen MBID mapping modal
MonkeyDo Aug 1, 2024
65aa6ac
Improve multi-listen mapping modal
MonkeyDo Aug 5, 2024
bb4a55a
Small UI fixes for MBIDMapping page
MonkeyDo Aug 5, 2024
b7224ba
Misc. accordion component improvements
MonkeyDo Aug 5, 2024
86ce4f2
Move MultiTrackMBIDMappingModal
MonkeyDo Aug 5, 2024
8da8a45
Missing Data page: fix navigation +layout
MonkeyDo Aug 5, 2024
c4f7123
MissingData: Move button first in accoridon header
MonkeyDo Aug 5, 2024
4499b48
MultiTrackMappingModal: re-add modal backdrop
MonkeyDo Aug 5, 2024
d749961
MultiTrackMappingModal: Fix backdrop
MonkeyDo Aug 5, 2024
58d45ef
MissingData: Fix pagination using react-router params
MonkeyDo Aug 6, 2024
c1b3799
Missing Data: remove items from page once linked
MonkeyDo Aug 6, 2024
1a7dadc
MissingData: add missing keys for React
MonkeyDo Aug 6, 2024
52d79a1
Lint
MonkeyDo Aug 7, 2024
b19d79e
Fix MissingMBData tests + accordion accessibility
MonkeyDo Aug 8, 2024
5bfaf77
Test fixtures
MonkeyDo Aug 8, 2024
4742306
MissingData: Fix accordion component styling
MonkeyDo Aug 9, 2024
7237c3c
MissingData: Fix accordion titles/buttons
MonkeyDo Aug 9, 2024
ea07f5b
Spark: Increase limit of top tracks for missing data > 1000
MonkeyDo Aug 9, 2024
da43479
MissingData: Add last updated date if available
MonkeyDo Aug 9, 2024
62f61a2
MissingData: Tweak help texts
MonkeyDo Aug 9, 2024
795bf15
MissingData: cleanup
MonkeyDo Aug 9, 2024
2861560
MissingData: Remove deleted listens from ambient queue
MonkeyDo Aug 9, 2024
e2e02c8
MissingData: Use Promise.allSettled for mapping promises
MonkeyDo Aug 12, 2024
0e1e247
MultiMapping: Fix return values for multi-mapping modal
MonkeyDo Aug 12, 2024
d8c1268
MissingData: Remove items from playing queue after matching/removal
MonkeyDo Aug 12, 2024
7675909
Fix test and lint
MonkeyDo Aug 12, 2024
65e4b8a
MissingData: Add 'artist:' field hint in release search string
MonkeyDo Aug 12, 2024
37ef78d
Accordion: Remove border from panel heading
MonkeyDo Aug 12, 2024
37e86d9
MissingData: Singular or plural accordingly in dynamic text content
MonkeyDo Aug 12, 2024
04681da
MissingData: Alert content styling
MonkeyDo Aug 12, 2024
1f651cb
Merge branch 'brainzplayer-spa' into rebased-multi-track-mbid-mapping
anshg1214 Aug 12, 2024
7cc6efc
MissingData: Group artist search terms
MonkeyDo Aug 13, 2024
c97c5a4
refactor: cleanup and format
anshg1214 Aug 13, 2024
2336987
MissingData: Add more advanced search options
MonkeyDo Aug 13, 2024
5a8773e
MissingData: Reimplement data fetching pattern
MonkeyDo Aug 13, 2024
a0d9913
MissingData: Reduce dependencies
MonkeyDo Aug 13, 2024
da268fc
MissingData: Colorful background for success and error toasts
MonkeyDo Aug 13, 2024
85b50c0
MissingData: Fix last_updated type
MonkeyDo Aug 13, 2024
af354b6
MissingData: Fix use of undefined recording_msid
MonkeyDo Aug 13, 2024
f2bb711
Cleanup
MonkeyDo Aug 19, 2024
31077a9
Merge branch 'master' into rebased-multi-track-mbid-mapping
MonkeyDo Aug 19, 2024
8d0fc59
Allow submitting mapping if search input empty
MonkeyDo Aug 21, 2024
b5e0de1
MissingMBData: Fix tests
MonkeyDo Aug 21, 2024
109c307
Add loader indicator in album and track search components
MonkeyDo Aug 21, 2024
3ee6570
Formatting
MonkeyDo Aug 21, 2024
6147398
Fix bug in success message
MonkeyDo Aug 22, 2024
6a96ae7
Resert MultiMapping modal on close
MonkeyDo Aug 22, 2024
4447809
Missing space in help text
MonkeyDo Aug 22, 2024
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
20 changes: 20 additions & 0 deletions frontend/css/accordion.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.accordion .panel-heading {
display: flex;
align-items: center;
padding: 8px 10px;
border-bottom: 0;
.panel-title {
font-weight: 400;
font-size: 1em;
width: 100%;
> small {
font-weight: 300;
}
}
.panel-actions {
margin-left: auto;
}
.accordion-arrow {
margin-right: 0.7em;
}
}
1 change: 1 addition & 0 deletions frontend/css/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
@import "entity-pages.less";
@import "release-card.less";
@import "search.less";
@import "accordion.less";

@icon-font-path: "/static/fonts/";

Expand Down
64 changes: 64 additions & 0 deletions frontend/js/src/common/Accordion.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/* Thanks go to Yogesh Chavan (https://github.com/myogeshchavan97) for the base for this implementation:
https://github.com/myogeshchavan97/react-accordion-demo
*/
import { faChevronCircleRight } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { uniqueId } from "lodash";
import * as React from "react";
import { COLOR_LB_LIGHT_GRAY } from "../utils/constants";

type AccordionProps = {
title: string | JSX.Element;
actions?: JSX.Element;
bootstrapType?:
| "danger"
| "warning"
| "info"
| "success"
| "primary"
| "default";
defaultOpen?: boolean;
};
export default function Accordion({
title,
actions,
bootstrapType = "default",
defaultOpen,
children,
}: React.PropsWithChildren<AccordionProps>) {
const [isActive, setIsActive] = React.useState(Boolean(defaultOpen));
const contentID = uniqueId();
return (
<div className={`panel panel-${bootstrapType} accordion`} key={uniqueId()}>
<div className="panel-heading" role="heading" aria-level={3}>
<div
role="button"
onClick={() => setIsActive(!isActive)}
aria-expanded={isActive}
aria-controls={contentID}
tabIndex={0}
onKeyDown={() => setIsActive(!isActive)}
>
<FontAwesomeIcon
className="accordion-arrow"
icon={faChevronCircleRight}
rotation={isActive ? 90 : undefined}
color={COLOR_LB_LIGHT_GRAY}
/>
<span className="panel-title">{title}</span>
</div>
{actions && <span className="panel-actions">{actions}</span>}
</div>
{isActive && (
<div
className="panel-body"
id={contentID}
role="region"
aria-labelledby=""
>
{children}
</div>
)}
</div>
);
}
1 change: 1 addition & 0 deletions frontend/js/src/common/listens/ListenControl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ function ListenControl(props: ListenControlProps) {
icon={icon as IconProp}
className={iconClassName}
size={iconSize}
fixedWidth
/>
);
}
Expand Down
2 changes: 1 addition & 1 deletion frontend/js/src/error/ErrorBoundary.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from "react";
import * as React from "react";
import { Helmet } from "react-helmet";
import { isRouteErrorResponse, Link, useRouteError } from "react-router-dom";

Expand Down
Loading