-
Notifications
You must be signed in to change notification settings - Fork 34
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
Updated iframe properties dialog #1828
base: dev/33-serpierite
Are you sure you want to change the base?
Updated iframe properties dialog #1828
Conversation
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 looks great! I especially love the sizing options, those SVGs look awesome. Great work!
One thing is that in the advanced options, the description text can be overlapped by the toggle button if the window isn't wide enough (shown below).
Also, this may just be a me thing, but I think that the labels in the 'Options' section should be vertically centered with respect to their inputs as well.
This is probably pretty nitpicky, but I think the 'Content type' label should be aligned with the options box - currently it's aligned with the container that contains the description text so it's sitting slightly below where it seems like it should. Similarly I think the 'Sizing' label should be aligned with the middle bullet point, though getting them to properly line up there might be annoying. (If anyone disagrees with this, I'm open to being convinced otherwise)
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.
Super excited about this, sorry for the delay in the review. I think you have the base of the form working pretty well, but I do have a bit of feedback on changes:
First screen:
- The preview input needs a debounce. If I try to type in a URL as soon as I input one character the iframe attempts to load right away (1)
- If you give the input an invalid URL, it will instead load the editor inside the iframe. Likewise, checking if the input is an iframe embed code could be simplified by trying to put the users' text as innerHTML inside a div and poking into the div to see if the browser created a valid iframe. You can see an example of both of these techniques inside the "parse-youtube-url.js" file, in the
parseYouTubeURL
function. It might be worthwhile to extract this code and generalize it to be able to be used in both places. (2) - Add a 1px $color-shadow border to the iframe preview (3)
- The "Does the preview look good?" help-text state expands the dialog to suddenly be very wide. Want to make sure the width doesn't change between these states. (4)
Second screen:
- The Content type and Sizing boxes need
cursor:pointer
and a hover state. (5) - The "px" in the Fixed size sizing option as well as the "!" in the warning icon under the Loading select box is using some default-level font. If these are in the SVG you'll want to use Libre Franklin (free to download) and then export the SVG with the fonts rendered as shapes. (6)
- Dialog needs a min-width so that the helper text below the Content type boxes doesn't wrap (7)
- Switching the different Content Type choices should set the options below automatically. By default 'Video or other media' would set Fit to Scale, Reload turned on and the other controls turned off. Embedded webpage should set Fit to Scroll and enable all controls. Additionally Sizing should default to Responsive - text width. (8)
- The text "Load when student sees IFrame" should be changed to "Load when student clicks IFrame" (9)
General:
- Buttons and inputs seem to be using Arial - want to use the standard Selects, Buttons and inputs for these. The Materia dialog uses SettingsDialogForm, that could be of use - It helps build out forms - Ian added it in the Materia branch. (10)
- When displayed in the viewer there seems to be a gray background to iframes - If a page doesn't define a background color it's more noticeable. (11)
- Editing an iframe should jump to the second screen if the iframe has a URL set (12)
… into issue/1536-updated-iframe-properties-dialog
I numbered the issues on Zac's last comment so they are easier to address and talk about. (1) Done. |
Finished applying the changes Zac requested. This PR is testable/reviewable again. The tests that are not passing are some uncovered React functions I had to write in order to control more complicated hover/click actions (Change n#5 above). I'm just waiting to get your feedback on the current hover/click states I implemented before writing new tests to cover those new functions. |
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.
LGTM! Did some playing around with changing the settings, everything looks to be working as expected. Great work!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We do this to keep our backlog under control, but we thank you for your contributions. |
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.
After merging in changes from dev/31 and updating snapshots, this looks like it's running well.
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.
Merged in the current dev branch and checked functionality, it looks like all of this is working really well.
I did also contribute to this so it should probably have another person besides me look it over before I finalize it.
These iframe options are really cool. I didn't find any issues with anything. I tested on different browsers and played around with the sizing and other settings. |
Fixes #1536