-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add new section to My Space (#260)
* Move custom usa-button styles to new class name * Move add link form to CustomCollection * Hook up add bookmark resolver * Add modal root portal * Set up AddCustomLink modal * Update react uswds sha * Fix modal props * Update modals branch * Fix build, lint errors, add E2E test * Update E2E tests * Remove collection button and modal working * Fix tests, split out RemovableBookmark component * Add tests to modal * Add tests for ModalPortal * Fix handling reset state after adding a link * Reset modal form on close * Fix outside click hook * Add renderWithModalRoot test helper fn * Start working on select mode * Fix ref for menu trigger * Update Modal implementation * Move hooks into directory, update Storybook component * Fix new modal * Adding tests and fixing bugs * Styling SelectableCollection * Selecting collection UX * Make SelectableCollection accessible, add tests * Add unit tests for Dropdown Menu * Add unit tests for remove custom collection modal * Adding specific dialog name * Fixing test id and tests * Add remove collection to cypress test * Reorg SelectableCollection component * Hook up add collections mutation * Add E2E test * Edits to address feedback * Fix cypress tests * Redirect to MySpace after adding collections, tests * AddWidget component, updates to DropdownMenu * Update tests * Revert list change * Add E2E tests * Remove only from Cypress tests * Add z index to dropdown menu * Update DropdownMenu props to always require a triggerEl * Fix tests, rename prop Co-authored-by: Abigail Young <[email protected]>
- Loading branch information
Showing
15 changed files
with
512 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
@import 'styles/uswdsDependencies'; | ||
|
||
.addWidget { | ||
display: block; | ||
cursor: pointer; | ||
text-align: center; | ||
background-color: rgba(220, 222, 224, 0.15); | ||
border: 1px solid color('base-lighter'); | ||
box-sizing: border-box; | ||
box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.15); | ||
border-radius: 4px; | ||
height: 400px; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
} | ||
|
||
.addWidgetButton { | ||
cursor: pointer; | ||
border: none; | ||
background: transparent; | ||
color: #585a5c; | ||
@include u-font-size('body', 'lg'); | ||
|
||
svg { | ||
pointer-events: none; | ||
} | ||
} | ||
|
||
.plus { | ||
color: rgba(0, 0, 0, 0.1); | ||
svg { | ||
width: 70px; | ||
height: 70px; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import React from 'react' | ||
import { Meta } from '@storybook/react' | ||
|
||
import AddWidget from './AddWidget' | ||
|
||
type StorybookArgTypes = { | ||
handleSelectCollection: () => void | ||
} | ||
|
||
export default { | ||
title: 'Components/AddWidget', | ||
component: AddWidget, | ||
argTypes: { | ||
handleSelectCollection: { action: 'Select existing collection(s)' }, | ||
}, | ||
} as Meta | ||
|
||
export const DefaultAddWidget = (argTypes: StorybookArgTypes) => ( | ||
<AddWidget handleSelectCollection={argTypes.handleSelectCollection} /> | ||
) |
Oops, something went wrong.