This repository was archived by the owner on Jul 9, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 374
feat: Deep linking for the notification page #1667
Merged
Merged
Changes from all commits
Commits
Show all changes
54 commits
Select commit
Hold shift + click to select a range
729c2bf
deeplink for lg
lei9444 b956bd0
make lu link to dialog
lei9444 5728996
Merge branch 'master' into deeplink
lei9444 49e4940
make lu inline editor show error
lei9444 fd4fdb2
fix the lgeditor coderange error
lei9444 c58f800
fix code range type
lei9444 971376c
fix test
lei9444 f83a043
remove wait
lei9444 926ec36
edit e2e azure pipelines
lei9444 7252278
update e2e dir
lei9444 cedfece
fix some comments
lei9444 9ee13c1
Merge branch 'master' into deeplink
lei9444 27762f0
fix unit test
lei9444 678be71
Merge branch 'master' into deeplink
lei9444 216f243
add dialog check
lei9444 b86b979
add dialog error jump
lei9444 b0b72b3
fix lg templete type error
lei9444 4dadf1c
fix lint
lei9444 e291bcc
Merge branch 'master' into deeplink
lei9444 460b944
change the build order
lei9444 aba5ce6
fix conflict
lei9444 ae2ee21
fix some type
lei9444 b9b2ef1
disable start button if bot has error
lei9444 7136308
hide the emulater button
lei9444 4f4e4dc
fix e2e test and lg page crash
lei9444 4243ea5
add some e2e test and unit test
lei9444 2533c56
fix some comment
lei9444 f9f4d17
Merge branch 'master' into deeplink
lei9444 5174fae
move lgutil from shared to indexers
lei9444 afc3581
add e2e test
lei9444 6d90ee7
use indexer types
lei9444 aa90724
Merge branch 'master' into deeplink
lei9444 1d3d026
Merge branch 'master' into deeplink
lei9444 5a027ef
add schema to check expression field
lei9444 be2c128
make empty expression as waining
lei9444 9ebf451
fix lint and e2e test
lei9444 d1fbec1
fix test
lei9444 a264147
add some unit test
lei9444 7f8e233
fix a dialog nav bug
lei9444 940e37a
fix some ui comments
lei9444 940c85f
Merge branch 'master' into deeplink
lei9444 c65df3a
remove some code
lei9444 bac053f
fix unit test
lei9444 cd3c006
add empty check
lei9444 02c9f2f
make notifications single click
lei9444 73e51de
clean the tsconfig in shared
lei9444 0e4665a
fix list header
lei9444 cecc4c2
update the style
lei9444 f1b7319
update the e2e test
lei9444 cc9e72e
Merge branch 'master' into deeplink
lei9444 f583103
fix some conflict
lei9444 0b59aba
implement Pagination
lei9444 33a4386
fix pagination select from dropdown error
lei9444 7ad6124
fix expression function error
lei9444 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
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
65 changes: 65 additions & 0 deletions
65
Composer/packages/client/src/components/Pagination/index.tsx
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,65 @@ | ||
| // Copyright (c) Microsoft Corporation. | ||
| // Licensed under the MIT License. | ||
|
|
||
| /** @jsx jsx */ | ||
| import { jsx } from '@emotion/core'; | ||
| import { DefaultButton } from 'office-ui-fabric-react/lib/Button'; | ||
| import { Dropdown, IDropdownOption } from 'office-ui-fabric-react/lib/Dropdown'; | ||
| import { useState, useEffect } from 'react'; | ||
|
|
||
| import { container, dropdownStyles, text } from './style'; | ||
|
|
||
| export interface IPaginationProps { | ||
| pageCount: number; | ||
| onChange: (page: number) => void; | ||
| } | ||
|
|
||
| const createDropdownOption = (pageCount: number) => { | ||
| const options: IDropdownOption[] = []; | ||
| for (let i = 1; i <= pageCount; i++) { | ||
| options.push({ key: 'page' + i, text: '' + i }); | ||
| } | ||
| return options; | ||
| }; | ||
|
|
||
| export const Pagination: React.FC<IPaginationProps> = props => { | ||
| const [index, setIndex] = useState(0); | ||
| const { pageCount, onChange } = props; | ||
|
|
||
| useEffect(() => { | ||
| setIndex(0); | ||
| }, [pageCount]); | ||
|
|
||
| const handlePageSelected = (event: React.FormEvent<HTMLDivElement>, item?: IDropdownOption, index?: number) => { | ||
| setIndex(index || 0); | ||
| onChange(index ? index + 1 : 1); | ||
| }; | ||
|
|
||
| const hanglePreviousClick = () => { | ||
| const current = index - 1; | ||
| setIndex(current); | ||
| onChange(current + 1); | ||
| }; | ||
|
|
||
| const hangleNextClick = () => { | ||
| const current = index + 1; | ||
| setIndex(current); | ||
| onChange(current + 1); | ||
| }; | ||
|
|
||
| return ( | ||
| <div css={container}> | ||
| <DefaultButton text="< Previous" allowDisabledFocus onClick={hanglePreviousClick} disabled={index === 0} /> | ||
| <span css={text}>Page</span> | ||
| <Dropdown | ||
| placeholder="Select options" | ||
| options={createDropdownOption(pageCount)} | ||
| styles={dropdownStyles} | ||
| selectedKey={`page${index + 1}`} | ||
| onChange={handlePageSelected} | ||
| /> | ||
| <span css={text}>of {pageCount}</span> | ||
| <DefaultButton text="Next >" allowDisabledFocus onClick={hangleNextClick} disabled={index === pageCount - 1} /> | ||
| </div> | ||
| ); | ||
| }; |
24 changes: 24 additions & 0 deletions
24
Composer/packages/client/src/components/Pagination/style.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,24 @@ | ||
| // Copyright (c) Microsoft Corporation. | ||
| // Licensed under the MIT License. | ||
|
|
||
| import { css } from '@emotion/core'; | ||
| import { IDropdownStyles } from 'office-ui-fabric-react/lib/Dropdown'; | ||
|
|
||
| export const dropdownStyles: Partial<IDropdownStyles> = { | ||
| dropdown: { width: 80 }, | ||
| }; | ||
|
|
||
| export const container = css` | ||
| display: flex; | ||
| width: 400px; | ||
| height: 45px; | ||
| padding-top: 5px; | ||
| line-height: 30px; | ||
| background-color: transparent; | ||
| justify-content: space-around; | ||
| `; | ||
|
|
||
| export const text = css` | ||
| font-size: 12px; | ||
| cursor: default; | ||
| `; |
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.