-
Notifications
You must be signed in to change notification settings - Fork 314
Update modal dialog #8201
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
Merged
Merged
Update modal dialog #8201
Changes from 18 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
79bfdb7
Delete old reset button stories.
zutigrm 2b0209a
Add v6 version of reset button stories.
zutigrm 0c246f5
Add title icon and reverse the order of buttons.
zutigrm 13cb135
Add additional props for class and modal width.
zutigrm 28feb1f
Include medium prop to adapt dialog width.
zutigrm 773dde0
Add AuthenticatedPermissionsModal stories.
zutigrm 53091fc
Add styles.
zutigrm 9f4af7d
Update VRT reference images.
zutigrm 51205b1
Move default props value to the main object.
zutigrm d90ad83
Remove non-existant prop from the list.
zutigrm d25a2d6
Edit story name.
zutigrm 81bc12e
Update styles per CR feedback.
zutigrm 35e2962
Add more ModalDialog stories.
zutigrm aa10c49
Add VRT reference images.
zutigrm 864cfcf
Update default max-width.
zutigrm d51f72f
Add small prop.
zutigrm 140c789
Update tests.
zutigrm 4ab919c
Update VRT due to the max-width change for modal width.
zutigrm ea66d50
Update per CR feedback.
zutigrm 8a8acb8
Update VRT images.
zutigrm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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
61 changes: 61 additions & 0 deletions
61
assets/js/components/PermissionsModal/AuthenticatedPermissionsModal.stories.js
This file contains hidden or 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,61 @@ | ||
/** | ||
* AuthenticatedPermissionsModal Component Stories. | ||
* | ||
* Site Kit by Google, Copyright 2024 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 | ||
* | ||
* https://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. | ||
*/ | ||
|
||
/** | ||
* Internal dependencies | ||
*/ | ||
import AuthenticatedPermissionsModal from './AuthenticatedPermissionsModal'; | ||
import WithRegistrySetup from '../../../../tests/js/WithRegistrySetup'; | ||
import { provideUserAuthentication } from '../../../../tests/js/utils'; | ||
import { CORE_USER } from '../../googlesitekit/datastore/user/constants'; | ||
|
||
function Template() { | ||
return <AuthenticatedPermissionsModal />; | ||
} | ||
|
||
export const Default = Template.bind( {} ); | ||
Default.storyName = 'AuthenticatedPermissionsModal'; | ||
Default.decorators = [ | ||
( Story ) => { | ||
const setupRegistry = ( registry ) => { | ||
registry.dispatch( CORE_USER ).receiveConnectURL( 'test-url' ); | ||
registry.dispatch( CORE_USER ).setPermissionScopeError( { | ||
status: 500, | ||
message: | ||
'You’ll need to contact your administrator. Trouble getting access?', | ||
data: { | ||
scopes: [ | ||
'https://www.googleapis.com/auth/analytics.readonly', | ||
], | ||
}, | ||
} ); | ||
provideUserAuthentication( registry ); | ||
}; | ||
|
||
return ( | ||
<WithRegistrySetup func={ setupRegistry }> | ||
<Story /> | ||
</WithRegistrySetup> | ||
); | ||
}, | ||
]; | ||
|
||
export default { | ||
title: 'Components/AuthenticatedPermissionsModal', | ||
component: AuthenticatedPermissionsModal, | ||
}; |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.