-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Read Only Mode in Canvas #23304
Merged
Merged
Read Only Mode in Canvas #23304
Changes from 24 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
58ca391
Added readOnly to transient state
cqliu1 37bb076
Added check that user has permission to edit when loading workpads
cqliu1 e3717b7
Shows toolbar in readOnly mode
cqliu1 0ab8152
Disables page controls in read only mode
cqliu1 8b5252d
Disables add page button when editing disabled
cqliu1 2264d50
Added comment to workpad routes
cqliu1 4ae0cd5
Cleaned up page manager styles
cqliu1 585a769
Added a comment to es_persist
cqliu1 aea0b81
Merge branch 'master' into feat/read-only-mode
cqliu1 2118571
Renamed transient.readOnly to transient.readOnlyUser
cqliu1 e6f3c2f
Replaced isEditing in transient state with readOnly in workpad state
cqliu1 f9fd32c
Cleaned up workpad_header
cqliu1 6c20700
Fixed logic in workpad_header
cqliu1 a1a0a70
Merge branch 'master' into feat/read-only-mode
cqliu1 67aa2e4
Merge branch 'master' into feat/read-only-mode
cqliu1 6220531
Disables workpad controls instead of hiding them and adds tooltips
cqliu1 d417157
Merge branch 'master' into feat/read-only-mode
cqliu1 4d5ecf3
Switched eye icon to lock icon in workpad header
cqliu1 01c0b3b
Merge branch 'master' into feat/read-only-mode
cqliu1 3acc54e
Merge branch 'master' into feat/read-only-mode
cqliu1 6a7ee14
Renamed readOnly and readOnlyUser variables and functions
cqliu1 bcf9e30
Added dispatch to update canUserWrite in create/clone/delete workpads
cqliu1 d429466
Fixed typo
cqliu1 6990d12
Removed unnecessary prop from workpad
cqliu1 b8ce43d
Refactored tooltips in workpad_loader
cqliu1 2ef216a
Added workpad selector tests
cqliu1 238a3a1
Merge branch 'master' into feat/read-only-mode
cqliu1 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 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 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 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 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 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 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 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 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 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 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 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 |
---|---|---|
|
@@ -10,7 +10,7 @@ import { compose, withState, withProps, getContext, withHandlers } from 'recompo | |
import { transitionsRegistry } from '../../lib/transitions_registry'; | ||
import { undoHistory, redoHistory } from '../../state/actions/history'; | ||
import { fetchAllRenderables } from '../../state/actions/elements'; | ||
import { getFullscreen, getEditing } from '../../state/selectors/app'; | ||
import { getFullscreen } from '../../state/selectors/app'; | ||
import { | ||
getSelectedPageIndex, | ||
getAllElements, | ||
|
@@ -25,7 +25,6 @@ const mapStateToProps = state => ({ | |
totalElementCount: getAllElements(state).length, | ||
workpad: getWorkpad(state), | ||
isFullscreen: getFullscreen(state), | ||
isEditing: getEditing(state), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This prop wasn't being used in the workpad component, so I removed it. |
||
}); | ||
|
||
const mapDispatchToProps = { | ||
|
This file contains 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.
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.
Since you mentioned there will be a new permissions API forthcoming, consider adding a
TODO
comment here with a follow-up task?