Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

feat: integrate SearchBarPluginFilters in PluginManager #2420

Merged
merged 14 commits into from
Jul 9, 2020

Conversation

goga-m
Copy link
Contributor

@goga-m goga-m commented Jul 9, 2020

Summary

  • Apply MSQ theme in SearchBarPluginFilters
  • Add filtering UX, selected state, and event handlers
  • Integrate in PluginManager page
  • Additional PluginManager UI adjustments

2020-07-09-165406_1273x789_scrot

Usage:

	const categories = [
		{
			label: "Game",
			value: "game",
		},
		{
			label: "Utility",
			value: "utility",
		},
		{
			label: "Themes",
			value: "themes",
		},
		{
			label: "Other",
			value: "other",
		},
	];

	const initialValues = {
		rating: 3,
		categories: ["games"],
		claimed: false,
	};

	return (
		<SearchBarPluginFilters
			initialValues={initialValues}
			onChange={(newValues) => {
				// newValues format example:
				// {
				// 	rating: 4,
				// 	categories: ["games"],
				// 	claimed: false,
				// };
			}}
			onReset{() => void}
			categories={categories}
			ratings={[5, 4, 3, 2, 1]}
		/>
	);

Checklist

  • Documentation (if necessary)
  • Tests (if necessary)
  • Ready to be merged

@goga-m goga-m requested a review from faustbrian as a code owner July 9, 2020 13:54
@ghost ghost added Complexity: Undetermined Needs specialized, in-depth review. Type: Feature The issue is a request for new functionality. labels Jul 9, 2020
@codecov
Copy link

codecov bot commented Jul 9, 2020

Codecov Report

Merging #2420 into 3.0-react will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@              Coverage Diff              @@
##           3.0-react     #2420     +/-   ##
=============================================
  Coverage     100.00%   100.00%             
=============================================
  Files             24       251    +227     
  Lines            142      2496   +2354     
  Branches          18       468    +450     
=============================================
+ Hits             142      2496   +2354     
Flag Coverage Δ
#unit 100.00% <100.00%> (?)
Impacted Files Coverage Δ
src/app/components/Button/Button.tsx 100.00% <ø> (ø)
src/app/components/Card/CardControl.tsx 100.00% <ø> (ø)
src/app/App.tsx 100.00% <100.00%> (ø)
src/app/components/Address/Address.tsx 100.00% <100.00%> (ø)
src/app/components/Alert/Alert.tsx 100.00% <100.00%> (ø)
src/app/components/Avatar/Avatar.tsx 100.00% <100.00%> (ø)
src/app/components/Badge/Badge.styles.ts 100.00% <100.00%> (ø)
src/app/components/Badge/Badge.tsx 100.00% <100.00%> (ø)
src/app/components/Breadcrumbs/Breadcrumbs.tsx 100.00% <100.00%> (ø)
src/app/components/Button/Button.styles.ts 100.00% <100.00%> (ø)
... and 276 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 98ccfe1...d980cab. Read the comment docs.

@faustbrian faustbrian merged commit 293d29a into 3.0-react Jul 9, 2020
@ghost ghost deleted the refactor/plugin-manager-search-filters branch July 9, 2020 15:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Complexity: Undetermined Needs specialized, in-depth review. Type: Feature The issue is a request for new functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants