-
Notifications
You must be signed in to change notification settings - Fork 172
Google Docs: Adding select tabs step [INTEG-3534] #10704
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
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
45f9f46
feat: extend timeout to 50 minutes and add in timing markers (#10608)
ryunsong-contentful e6a57e3
fix: update AGENT_ANALYZER_ID constant to reflect new workflow agent …
harikakondur f2ba1f7
fix: update local agents API URL to use constant for base URL
harikakondur e9b83fa
fix(google-docs): add pagination for content type fetching [INTEG-349…
harikakondur 281450d
chore: add env example
harikakondur be83fbf
Merge branch 'google-docs-quality' of https://github.com/contentful/a…
harikakondur ec9e046
chore: update readme
harikakondur 394e607
fix: cleanup test modal [INTEG-3496] (#10682)
harikakondur ca47e8b
cleaning unnecessary steps
FBanfi 44fde50
adding close button for first step
FBanfi f9253a2
adding select tabs step
FBanfi cca6f84
removing unused custom hook and usages
FBanfi 1463987
Merge branch 'google-docs-hil' into google-docs-modal-cleanup
FBanfi c7810c3
solving conflicts in merge
FBanfi 3cda72e
Merge branch 'google-docs-hil' into google-docs-modal-cleanup
FBanfi afb542b
adding select tabs step
FBanfi d8aa5b0
Merge remote-tracking branch 'origin/google-docs-tabs' into google-do…
FBanfi c7c169b
removing unused hook
FBanfi 65e1bd6
adding select tabs modal tests
FBanfi 7df0c36
wip changing tabs modal step
FBanfi 38149d5
refactors and fixing multiselect bug
FBanfi f308aff
Merge branch 'google-docs-hil' into google-docs-tabs
FBanfi 841af57
refactoring selected tabs and content types modals
FBanfi 265fb2c
fixing build errors
FBanfi dcc3794
adding truncation in content types selection
FBanfi e27fe00
addressing PR comments
FBanfi bfa4c34
Merge branch 'google-docs-hil' into google-docs-tabs
FBanfi 1529c55
changing onClose from tabs step
FBanfi 53f6333
addressing pr comments
FBanfi 66ac557
changing selected tabs setter usage
FBanfi 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| import { useEffect, useRef, type RefObject } from 'react'; | ||
|
|
||
| export const useMultiselectScrollReflow = <T>(selection: T[]): RefObject<HTMLUListElement> => { | ||
| const listRef = useRef<HTMLUListElement>(null); | ||
|
|
||
| useEffect(() => { | ||
| if (listRef.current) { | ||
| const element = listRef.current; | ||
| const currentScroll = element.scrollTop; | ||
| const maxScroll = element.scrollHeight - element.clientHeight; | ||
|
|
||
| if (currentScroll >= maxScroll) { | ||
| element.scrollTop = currentScroll - 1; | ||
| } else { | ||
| element.scrollTop = currentScroll + 1; | ||
| } | ||
|
|
||
| element.scrollTop = currentScroll; | ||
| } | ||
| }, [selection]); | ||
|
|
||
| return listRef; | ||
| }; |
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
20 changes: 20 additions & 0 deletions
20
.../google-docs/src/locations/Page/components/modals/step_2/ContentTypePickerModal.styles.ts
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,20 @@ | ||
| import { css } from '@emotion/css'; | ||
| import tokens from '@contentful/f36-tokens'; | ||
|
|
||
| export const multiselect = css({ | ||
| maxWidth: '74%', | ||
| }); | ||
|
|
||
| export const pillsContainer = css({ | ||
| marginRight: tokens.spacingXl, | ||
| maxHeight: '100px', | ||
| overflowY: 'scroll', | ||
| '&::-webkit-scrollbar': { | ||
| width: tokens.spacingXs, | ||
| height: tokens.spacingXs, | ||
| }, | ||
| '&::-webkit-scrollbar-thumb': { | ||
| background: tokens.gray400, | ||
| borderRadius: tokens.borderRadiusSmall, | ||
| }, | ||
| }); |
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
28 changes: 28 additions & 0 deletions
28
apps/google-docs/src/locations/Page/components/modals/step_3/SelectTabsModal.styles.ts
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,28 @@ | ||
| import { css } from '@emotion/css'; | ||
| import tokens from '@contentful/f36-tokens'; | ||
|
|
||
| export const multiselect = css({ | ||
| maxWidth: '68%', | ||
| }); | ||
|
|
||
| export const multiselectOption = css({ | ||
| padding: tokens.spacing2Xs, | ||
| }); | ||
|
|
||
| export const pillsContainer = css({ | ||
| marginRight: tokens.spacingXl, | ||
| maxHeight: '100px', | ||
| overflowY: 'scroll', | ||
| '&::-webkit-scrollbar': { | ||
| width: tokens.spacingXs, | ||
| height: tokens.spacingXs, | ||
| }, | ||
| '&::-webkit-scrollbar-thumb': { | ||
| background: tokens.gray400, | ||
| borderRadius: tokens.borderRadiusSmall, | ||
| }, | ||
| }); | ||
|
|
||
| export const modalControls = css({ | ||
| paddingTop: '0', | ||
| }); |
Oops, something went wrong.
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.