Skip to content

issue/2847 Improved notify subview handling#2848

Merged
oliverfoster merged 3 commits into
masterfrom
issue/2847
Aug 3, 2020
Merged

issue/2847 Improved notify subview handling#2848
oliverfoster merged 3 commits into
masterfrom
issue/2847

Conversation

@oliverfoster

@oliverfoster oliverfoster commented Jul 29, 2020

Copy link
Copy Markdown
Member

#2847

Added

  • Notify can now render any Adapt _id as a subview
  • Adapt.notify.stack for a list of open popups

Fixed

  • Resize jumping

Changed

  • Use native Adapt.log.deprecated instead of a notify specific one
  • Converted to ES6 classes
  • Notifies get appended to the body rather than prepended, preserving their stack order
  • Added styling so that shadow layers appear in the correct order and above the navigation bar
  • Only the last notify will respond to the last close / cancel event

Test

This should be accessibility tested. The feedback notify in the mcq should appear over the mcq notify and be completely keyboard navigable.

To show an mcq:

var Adapt = require('core/js/adapt');
Adapt.notify.popup({
  _id: 'c-65'
});

notify

To show a media component:

var Adapt = require('core/js/adapt');
Adapt.notify.popup({
  _id: 'c-40'
});

To show a text and graphic block:

var Adapt = require('core/js/adapt');
Adapt.notify.popup({
  _id: 'b-05'
});

notify2

To remove the close button and have a continue instead:

var Adapt = require('core/js/adapt');
Adapt.notify.alert({
  _id: 'b-05',
  confirmText: 'Continue'
});

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

code 👀

@kirsty-hames kirsty-hames left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@oliverfoster I haven't accessibility tested this yet as I'm not able to render the popup content in Chrome (running latest v). You can see from the screenshot that an empty Notify renders. I've tested in Firefox and not getting any issues.

I can see from your demo above you were also running Chrome. I'm on a Mac.

popup_content_not_rendering_in_chrome

UPDATE: Caching issue.

@kirsty-hames kirsty-hames left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

+1 Tested in latest Chrome, Firefox, Safari, iPhone iOS 13.5.1, iPad iOS 10.3.4.

Accessibility tested in IE11 running Jaws 18 (in particular Hotgraphic / MCQ where you have stacked Notifies).

@moloko moloko left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

code 👁️‍🗨️

@oliverfoster
oliverfoster merged commit 9e2db9b into master Aug 3, 2020
@oliverfoster
oliverfoster deleted the issue/2847 branch August 3, 2020 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants