Url preview block upgrade#1
Open
rwaldron wants to merge 3 commits into
Open
Conversation
How this block chooses a preview to show: Without a specified Table & Field: - The user selects a row in grid view. - The block looks in the Selected Field for a supported URL (e.g. https://www.youtube.com/watch?v=KYz2wyBy3kc) - The block uses this URL to construct an embed URL and inserts this URL into an iframe. With a Specified Table & Specified Field: - The user opens Settings and selects a Specified Table and Specified Field for URL previews. - The user selects a row in grid view. - If the Selected Field in the Active Table match the Specified Field & Specified Table, then: - The block looks in the Selected Field for a supported URL (e.g. https://www.youtube.com/watch?v=KYz2wyBy3kc) - If the block supports this URL, then: - The block uses this URL to construct an embed URL and inserts this URL into an iframe. - Else, - Display: "Select a cell to see a preview, View supported URLs" - Else, - If the Active Table does not match the Specified Table, then: - Display: "Switch to the “[Specified Table]” table to see previews." - If the Selected Field does match the Specified Field, then: - Display: "Switch to the “[Specified Field]” field to see previews."
…r choose between "Selected field" and "Specific field"
With a Specified Table & Specified Field:
- The user may use "Settings" to set a Specified Table and Specified Field for URL previews.
- The user may use "Settings" to toggle the Specified Table and Specified Field constraint.
jugglinmike
reviewed
Apr 1, 2020
| const [isSettingsVisible, setIsSettingsVisible] = useState(false); | ||
| useSettingsButton(() => { | ||
| if (!isSettingsVisible) { | ||
| viewport.enterFullscreenIfPossible(); |
There was a problem hiding this comment.
Automatically switching to full screen feels a little jarring to me. Unlike some other blocks, I can see and do everything I'm interested in from the default view.
Author
There was a problem hiding this comment.
That's the pattern used in all examples, with the exception of the name-quiz-block
| {label: 'Yes', value: IsEnforced.YES}, | ||
| {label: 'No', value: IsEnforced.NO}, | ||
| ]} | ||
| globalConfigKey={ConfigKeys.IS_ENFORCED} |
There was a problem hiding this comment.
When I load the Settings page for the first time, neither button for "Enforce Table & URL Field Settings?" is enabled.
Author
There was a problem hiding this comment.
Seems like a bug in SelectButtonsSynced, which is supposed to sync the value via the provided globalConfigKey
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.