Files
notifications-admin/app
Tom Byers 51033d57fb Make jobs notification partial a role of region
Previously attempted in this commit by changing
the element to a <section>:

e815a73233

This broke the updateContent.js, that polls the
JSON endpoint for the partial and updates its
content with changes sent back. From what I could
tell, it broke it because the JS that does the
update gets the diff between the current partial
and the one sent in JSON and applies it to the
current one.

If the notification hasn't completed before the
page loads, the partial added to the page has a
<div> wrapping it, to initalise the
updateContent.js JS. This means the diff ends up
being between elements with a different level of
hierarchy:

Element 1:

  <div data-module="update-content">
    <div class="ajax-block-container">
    ...
    </div>
  </div>

Element 2:
  <div class="ajax-block-container">
  ...
  </div>

This seems to work OK when the partial
is a <div>, I assume because it's the same type of
element as the wrapper, but not when it's a
<section>:

Element 1:

  <div data-module="update-content">
    <section class="ajax-block-container">
    ...
    </section>
  </div>

Element 2:
  <section class="ajax-block-container">
  ...
  </section>

Because of all this, it's easier to just give it
the role of 'region'.
2020-09-10 23:12:29 +01:00
..
2020-08-11 14:26:12 +01:00
2020-08-14 11:29:38 +01:00