Skip to content
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

Open
wants to merge 22 commits into
base: dev/33-serpierite
Choose a base branch
from

Conversation

maufcost
Copy link
Contributor

@maufcost maufcost commented May 20, 2021

Fixes #1536

@maufcost
Copy link
Contributor Author

A sneak peak at our new iframe properties modal:

iframe

@maufcost maufcost marked this pull request as ready for review June 7, 2021 15:29
@maufcost maufcost requested review from a team, iturgeon and jpeterson976 and removed request for a team June 9, 2021 14:14
Copy link
Contributor

@jpeterson976 jpeterson976 left a 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).

Screen Shot 2021-06-09 at 3 18 18 PM

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)

@zachberry zachberry added this to the 23 - Rose Quartz milestone Jun 14, 2021
@maufcost maufcost changed the base branch from dev/21-beryl to dev/23-rose-quartz June 14, 2021 14:14
Copy link
Member

@zachberry zachberry left a 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)

@zachberry zachberry modified the milestones: 23 - Rose Quartz, 24 - TBA Jun 24, 2021
@maufcost
Copy link
Contributor Author

maufcost commented Jun 30, 2021

I numbered the issues on Zac's last comment so they are easier to address and talk about.

(1) Done.
(2) Done.
(3) Done.
(4) Done.
(5) Done. I just need some feedback on the purple borders. Any thoughts about keeping the purple borders all the time or only on hover? Right now, I fixed it to be only on hover.
(6) Done.
(7) Done.
(8) Done.
(9) Done.
(10) Done. Applied the mixins and adapted inputs and selects to have the same border color.
(11) I haven't found any background colors set on iframes in the viewer. Could you send me any screenshots? :)
(12) Done.
(13) Proposing this one: I thought about disabling the button to go from the first modal to the second if the src typed is not valid. Any thoughts?

@maufcost
Copy link
Contributor Author

maufcost commented Jul 7, 2021

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.

jpeterson976
jpeterson976 previously approved these changes Jul 21, 2021
Copy link
Contributor

@jpeterson976 jpeterson976 left a 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!

@stale
Copy link

stale bot commented Apr 16, 2022

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.

@stale stale bot added the stale label Apr 16, 2022
@stale stale bot closed this Apr 25, 2022
@maufcost maufcost reopened this Apr 28, 2022
@stale stale bot removed the stale label Apr 28, 2022
@maufcost maufcost changed the base branch from dev/24-sunstone to dev/28-jadeite April 28, 2022 16:39
@maufcost maufcost dismissed jpeterson976’s stale review April 28, 2022 16:39

The base branch was changed.

@FrenjaminBanklin FrenjaminBanklin changed the base branch from dev/28-jadeite to dev/29-sodalite September 13, 2022 15:10
@FrenjaminBanklin FrenjaminBanklin changed the base branch from dev/29-sodalite to dev/31-taconite March 21, 2023 20:52
Copy link
Contributor

@FrenjaminBanklin FrenjaminBanklin left a 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.

@FrenjaminBanklin FrenjaminBanklin changed the base branch from dev/31-taconite to dev/33-serpierite September 27, 2023 19:21
@FrenjaminBanklin FrenjaminBanklin dismissed their stale review September 27, 2023 19:21

The base branch was changed.

Copy link
Contributor

@FrenjaminBanklin FrenjaminBanklin left a 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.

@RachelDau
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Updates to IFrame properties visual editor dialog
5 participants