-
Notifications
You must be signed in to change notification settings - Fork 2
Move deprecated AppUI functionality into mobile-ui-react. #75
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
Draft
tcobbs-bentley
wants to merge
5
commits into
main
Choose a base branch
from
travis/appui-deprecations-local-copies
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 2 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
48bc75d
Move deprecated AppUI functionality into mobile-ui-react.
tcobbs-bentley fa04ec8
Merge branch 'main' into travis/appui-deprecations-local-copies
tcobbs-bentley 7e30ace
Further AppUI deprecation fixes
tcobbs-bentley 3b03df8
Merge branch 'main' into travis/appui-deprecations-local-copies
tcobbs-bentley 852d7dc
Stop using SessionStateActionId.SetIModelConnection
tcobbs-bentley 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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| /*--------------------------------------------------------------------------------------------- | ||
| * Copyright (c) Bentley Systems, Incorporated. All rights reserved. | ||
| * See LICENSE.md in the project root for license terms and full copyright notice. | ||
| *--------------------------------------------------------------------------------------------*/ | ||
|
|
||
| /* | ||
| * NOTE: This entire file was copied from @itwin/core-react, where it is being deprecated. It was | ||
| * then modified to make things internal instead of public and deprecated. | ||
| */ | ||
|
|
||
| /** Signature for [[Timer]] execute callback. | ||
| * @internal | ||
| */ | ||
| export type ExecuteHandler = (this: void) => void; | ||
|
|
||
| /** Notifies handler after a set interval. | ||
| * @internal | ||
| */ | ||
| export class Timer { | ||
| private _delay: number; | ||
| private _isRunning = false; | ||
| private _timerId = 0; | ||
| private _onExecute: ExecuteHandler | undefined; | ||
|
|
||
| /** | ||
| * Creates a new Timer. | ||
| * @param msDelay Time interval in milliseconds after which handler will be notified. | ||
| */ | ||
| public constructor(msDelay: number) { | ||
| this._delay = msDelay; | ||
| } | ||
|
|
||
| /** Indicates whether the timer is running */ | ||
| public get isRunning(): boolean { | ||
| return this._isRunning; | ||
| } | ||
|
|
||
| /** Time interval in milliseconds after which handler will be notified. */ | ||
| public get delay() { | ||
| return this._delay; | ||
| } | ||
| public set delay(ms: number) { | ||
| this._delay = ms; | ||
| } | ||
|
|
||
| /** Set handler that is called after a set interval. */ | ||
| public setOnExecute(onExecute: ExecuteHandler | undefined) { | ||
| this._onExecute = onExecute; | ||
| } | ||
|
|
||
| /** Starts this Timer. */ | ||
| public start() { | ||
| if (this._isRunning) this.clearTimeout(); | ||
|
|
||
| this._isRunning = true; | ||
| this.setTimeout(); | ||
| } | ||
|
|
||
| /** Stops this Timer. */ | ||
| public stop() { | ||
| if (!this._isRunning) return; | ||
|
|
||
| this._isRunning = false; | ||
| this.clearTimeout(); | ||
| } | ||
|
|
||
| private execute() { | ||
| this._onExecute && this._onExecute(); | ||
| this._isRunning = false; | ||
| } | ||
|
|
||
| private setTimeout() { | ||
| this._timerId = window.setTimeout(() => this.execute(), this._delay); | ||
| } | ||
|
|
||
| private clearTimeout() { | ||
| window.clearTimeout(this._timerId); | ||
| } | ||
| } |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets review with the appui team why this was deprecated, and what they expected consumers to do, before we re-export a deprecated type from another repo as public here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed this to draft for now while we decide what to do and created a new PR to allow lint to pass.