-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into jhuleatt-rc-emulator
- Loading branch information
Showing
79 changed files
with
3,309 additions
and
793 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,9 @@ | ||
ALLOWED_EVENT_TYPES=com.stripe.v1.product.created | ||
CREATE_CHECKOUT_SESSION_MIN_INSTANCES=0 | ||
CUSTOMERS_COLLECTION=customers | ||
DELETE_STRIPE_CUSTOMERS=Do not delete | ||
EVENTARC_CHANNEL=projects/${param:PROJECT_ID}/locations/us-west1/channels/firebase | ||
LOCATION=us-west2 | ||
PRODUCTS_COLLECTION=products | ||
STRIPE_CONFIG_COLLECTION=configuration | ||
SYNC_USERS_ON_CREATE=Do not sync |
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,2 @@ | ||
STRIPE_API_KEY=asdf | ||
STRIPE_WEBHOOK_SECRET=fdsa |
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,9 @@ | ||
DELETE_ORIGINAL_FILE=false | ||
DO_BACKFILL=true | ||
FUNCTION_MEMORY=512 | ||
IMAGE_TYPE=jpeg | ||
IMG_BUCKET=resize_images_storage_bucket_90210 | ||
IMG_SIZES=200x200 | ||
IS_ANIMATED=true | ||
LOCATION=us-west2 | ||
MAKE_PUBLIC=true |
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 |
---|---|---|
|
@@ -35,5 +35,9 @@ | |
}, | ||
"remoteconfig": { | ||
"template": "remoteconfig.template.json" | ||
}, | ||
"extensions": { | ||
"storage-resize-images": "firebase/[email protected]", | ||
"firestore-stripe-payments": "stripe/[email protected]" | ||
} | ||
} |
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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
25 changes: 25 additions & 0 deletions
25
src/components/Auth/UsersCard/table/UsersCleared.module.scss
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,25 @@ | ||
/** | ||
* Copyright 2023 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
.visuallyHidden { | ||
clip: rect(0 0 0 0); | ||
clip-path: inset(50%); | ||
height: 1px; | ||
overflow: hidden; | ||
position: absolute; | ||
white-space: nowrap; | ||
width: 1px; | ||
} |
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,27 @@ | ||
/** | ||
* Copyright 2023 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
import { render } from '@testing-library/react'; | ||
import React from 'react'; | ||
|
||
import { UsersCleared } from './UsersCleared'; | ||
|
||
describe('UsersCleared', () => { | ||
it('renders header row when all users have been cleared from the table', () => { | ||
const { getByRole } = render(<UsersCleared alertText="" />); | ||
expect(getByRole('alert')).not.toBeNull(); | ||
}); | ||
}); |
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,57 @@ | ||
/** | ||
* Copyright 2023 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
import { connect } from 'react-redux'; | ||
|
||
import { createStructuredSelector } from '../../../../store'; | ||
import { getAlertText } from '../../../../store/auth/selectors'; | ||
import styles from './UsersCleared.module.scss'; | ||
|
||
export type UsersClearedProps = PropsFromStore; | ||
|
||
/** | ||
* | ||
* Renders a visibly hidden, but screenreader parseable, alert to | ||
* inform the user that all users have been deleted after the | ||
* `Clear All Data` button is pressed. The text rendered / | ||
* spoken in the component is housed in the auth redux store's | ||
* `alertText` field. Changing the value stored in this field triggers | ||
* a re-render of this component, which will force a screenreader to | ||
* read the new text. Thus, the value stored in `alertText` should only | ||
* be 1. updated when you want the screen reader to alert the user of something, | ||
* or 2. cleared to allow the screenreader to repeat a message (the text in | ||
* `alertText` is only read by the screenreader when the value is updated). | ||
* | ||
* Examples of such updates / clears are available in src/store/auth/reducer.tsx | ||
* | ||
*/ | ||
export const UsersCleared: React.FC< | ||
React.PropsWithChildren<UsersClearedProps> | ||
> = ({ alertText }) => { | ||
return ( | ||
<div className={styles.visuallyHidden} role="alert"> | ||
{alertText} | ||
</div> | ||
); | ||
}; | ||
|
||
export const mapStateToProps = createStructuredSelector({ | ||
alertText: getAlertText, | ||
}); | ||
|
||
export type PropsFromStore = ReturnType<typeof mapStateToProps>; | ||
|
||
export default connect(mapStateToProps)(UsersCleared); |
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
Oops, something went wrong.