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

Infrastructure: Codepen button should show only when resources loaded #1533

Merged
merged 4 commits into from
Oct 30, 2020

Conversation

spectranaut
Copy link
Contributor

@spectranaut spectranaut commented Sep 25, 2020

It was a good point @smhigley to show the button after the resources have been loaded instead of hiding it if they don't! :)

I didn't implement the promise array because XMLHttpRequest.send doesn't return a promise but that it's true that would have been much cleaner.

@@ -378,32 +380,28 @@ function addOpenInCodePenForm (exampleIndex, exampleHeaderId, exampleCodeId, exa
totalFetchedFiles++;
}
else {
hideButton(buttonId, "Could not load resource: " + href);
console.log("Not showing 'Open in Codepen' button. Could not load resource: " + href);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it make sense to warn/error for these?

Suggested change
console.log("Not showing 'Open in Codepen' button. Could not load resource: " + href);
console.warn("Not showing 'Open in Codepen' button. Could not load resource: " + href);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense! pushed commit for switch.

@mcking65
Copy link
Contributor

@smhigley friendly ping when you get time

@github-actions
Copy link
Contributor

github-actions bot commented Oct 22, 2020

Regression test coverage:

Examples without any regression tests:

  • button/button_idl.html
  • dialog-modal/alertdialog.html

Examples missing some regression tests:

  • combobox/combobox-autocomplete-both.html:
    • combobox-id
  • combobox/combobox-autocomplete-list.html:
    • combobox-id
  • combobox/combobox-autocomplete-none.html:
    • combobox-id
  • combobox/grid-combo.html:
    • textbox-key-down-arrow
    • textbox-key-up-arrow
  • dialog-modal/datepicker-dialog.html:
    • textbox-aria-describedby
  • menu-button/menu-button-actions-active-descendant.html:
    • menu-up-arrow
    • menu-down-arrow
    • menu-character
  • spinbutton/datepicker-spinbuttons.html:
    • spinbutton-down-arrow
    • spinbutton-up-arrow
    • spinbutton-page-down
    • spinbutton-page-up
    • spinbutton-home
    • spinbutton-end
  • toolbar/toolbar.html:
    • toolbar-tab
    • toolbar-right-arrow
    • toolbar-left-arrow
    • toolbar-home
    • toolbar-end
    • toolbar-toggle-esc
    • toolbar-toggle-enter-or-space
    • toolbar-radio-enter-or-space
    • toolbar-radio-down-arrow
    • toolbar-radio-up-arrow
    • toolbar-button-enter-or-space
    • toolbar-menubutton-enter-or-space-or-down-or-up
    • toolbar-menu-enter-or-space
    • toolbar-menu-down-arrow
    • toolbar-menu-up-arrow
    • toolbar-menu-escape
    • toolbar-spinbutton-down-arrow
    • toolbar-spinbutton-up-arrow
    • toolbar-spinbutton-page-down
    • toolbar-spinbutton-page-up
    • toolbar-checkbox-space
    • toolbar-link-enter-or-space
    • toolbar-aria-controls
    • toolbar-button-aria-pressed
    • toolbar-button-aria-hidden
    • toolbar-radiogroup-role
    • toolbar-radiogroup-aria-label
    • toolbar-radio-role
    • toolbar-radio-aria-checked
    • toolbar-radio-aria-hidden
    • toolbar-button-aria-disabled
    • toolbar-menubutton-aria-label
    • toolbar-menubutton-aria-haspopup
    • toolbar-menubutton-aria-controls
    • toolbar-menubutton-aria-expanded
    • toolbar-menu-role
    • toolbar-menu-aria-label
    • toolbar-menuitemradio-role
    • toolbar-menuitemradio-aria-checked
    • toolbar-menuitemradio-tabindex
    • toolbar-spinbutton-role
    • toolbar-spinbutton-aria-label
    • toolbar-spinbutton-aria-valuenow
    • toolbar-spinbutton-aria-valuetext
    • toolbar-spinbutton-aria-valuemin
    • toolbar-spinbutton-aria-valuemax

Example pages with Keyboard or Attribute table rows that do not have data-test-ids:

  • dialog-modal/alertdialog.html
    • "Keyboard Support" table(s):
      • Tab
      • Shift + Tab
      • Escape
      • Command + S
      • Control + S
    • "Attributes" table(s):
      • alertdialog
      • aria-labelledby=IDREF
      • aria-describedby=IDREF
      • aria-modal=true
      • alert

SUMMARY:

55 example pages found.
2 example pages have no regression tests.
8 example pages are missing approximately 61 out of approximately 775 tests.

ERROR - missing tests:

Please write missing tests for this report to pass.

Copy link
Contributor

@smhigley smhigley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

love it! :)

Copy link
Contributor

@carmacleod carmacleod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Looks good!

@mcking65
Copy link
Contributor

Thank you @smhigley and @carmacleod ... will merge!

@mcking65 mcking65 merged commit 7b64a06 into master Oct 30, 2020
@mcking65 mcking65 added enhancement Any addition or improvement that doesn't fix a code bug or prose inaccuracy Infrastructure Related to maintaining task force and repo operations, processes, systems, documentation labels Oct 30, 2020
@mcking65 mcking65 added this to the 1.2 Release 1 milestone Oct 30, 2020
@mcking65 mcking65 changed the title Codepen button should show only when resources loaded Infrastructure: Codepen button should show only when resources loaded Oct 30, 2020
@mcking65 mcking65 deleted the codepen-improvements branch October 30, 2020 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Any addition or improvement that doesn't fix a code bug or prose inaccuracy Infrastructure Related to maintaining task force and repo operations, processes, systems, documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants