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
Layout Manager Changes #10155
Layout Manager Changes #10155
Conversation
Hello @vitormateusalmeida it would be nice to have an extra configuration that's the ability to enable the debug window using keyboard ( it can be useful when providing support to a user ). So my suggestion would be to keep the Also, please add the browser's user agent on this debug window. |
window.addEventListener('resize', this.handleResize, false); | ||
document.addEventListener('keyup', (event) => { | ||
const key = event.key.toUpperCase(); | ||
if (SHOW_DEBUG_WINDOW_SHORTCUT && event.ctrlKey && event.altKey && key === 'K') { |
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.
Might be a good idea to have this shortcut follow some of the other shortcuts, using the accesskey
attribute for consistency. It should also be visible in the keyboard shortcut modal.
className={styles.debugModal} | ||
onRequestClose={() => mountModal(null)} | ||
hideBorder | ||
contentLabel="Debug" |
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.
This needs to be localized
> | ||
<div className={styles.row}> | ||
<div className={styles.col} aria-hidden="true"> | ||
<h3 className={styles.title}>Debug</h3> |
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.
This needs to be localized
<div className={cx(styles.col, styles.col_4)} aria-hidden="true"> | ||
<div className={styles.formElement}> | ||
<div className={styles.label}> | ||
User Agent: |
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.
This needs to be localized
type="button" | ||
onClick={() => navigator.clipboard.writeText(window.navigator.userAgent)} | ||
> | ||
Copy |
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.
This needs to be localized
icons={false} | ||
defaultChecked={autoArrangeLayout} | ||
onChange={() => this.autoArrangeToggle()} | ||
ariaLabel="teste" |
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.
This needs to be localized, and should be something meaningful.
<div className={styles.col}> | ||
<div className={cx(styles.formElement, styles.pullContentRight)}> | ||
<p className={styles.desc}> | ||
(it will be disabled if you drag or resize the webcams area) |
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.
This needs to be localized
// icon="application" | ||
customIcon={( | ||
<i className={styles.debugIcon}> | ||
<svg id="Icons" version="1.1" viewBox="0 0 32 32" xmlSpace="preserve" xmlns="http://www.w3.org/2000/svg" xmlnsXlink="http://www.w3.org/1999/xlink"> |
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.
For consistency, we could probably have @tylercopeland create a debug icon and use the Icon
component instead.
@@ -152,25 +152,32 @@ class PanelManager extends Component { | |||
|
|||
if (userListSize.width !== oldUserListSize.width && userListSize.width !== userlistWidth) { | |||
this.setUserListWidth(userListSize.width); | |||
this.forceUpdate(); |
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.
AFAIK we should be trying to avoid the use of this.forceUpdate
. Is there another alternative to this?
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.
In this case I don't think so, I need to do this to force another update after set the width by layout manager.
@@ -34,6 +34,8 @@ public: | |||
duration: 4000 | |||
remainingTimeThreshold: 30 | |||
remainingTimeAlertThreshold: 1 | |||
showDebugWindow: false | |||
showDebugWindowShortcut: true |
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.
This would be better in the shortcut section:
showDebugWindow:
accesskey: K
descId: showDebugWindow
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 the name of this parameters to make sense.
enableDebugWindowButton: (to show the button to access the debug window)
enableDebugWindowShortcut: (to enable the shortcut to show debug window)
There are 2 other bugs that were also introduced by #10144 .
|
|
||
componentDidMount() { | ||
window.addEventListener('resize', this.handleResize, false); | ||
document.addEventListener('keyup', (event) => { |
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 don't think we need to add another event listener. The button on line 191
just needs accessKey={SHOW_DEBUG_WINDOW_ACCESSKEY}
added to it as an attribute.
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 added a setting to disable the button, then the button not be render and the accessKey not be work
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.
Ahh, so the idea was to have the shortcut still functional when the button is hidden.
This PR