Skip to content

Conversation

@GUI
Copy link
Member

@GUI GUI commented Nov 16, 2018

This upgrades various dependencies within the admin UI to make maintenance easier.

  • Upgrade from Ember 2.18 to Ember 3.5
  • Upgrade layout from Bootstrap 3 to Bootstrap 4
  • Update other UI dependencies to latest versions.
  • Switch integration test suite from PhantomJS to Selenium and headless Chrome. Ember is no longer compatible with PhantomJS, so that's what drove this, but testing in a real version of Chrome should hopefully make these integration tests more reliable and accurate.
  • Eliminate globals when pulling in JavaScript dependencies and import everything using ES6.
  • Various tweaks to code for newer Ember linting recommendations.

GUI added 30 commits August 30, 2018 16:10
Since ember-cli-format-number wasn't compatible with newer versions,
implement our own helper using numeral.js directly.
- Get rid of global usage, and import all libraries.
- Various fixes for the query builder in bootstrap 4.
- Switch to tippy.js for tooltips for easier module imports.
Upgrade to Bootstrap 4.2 beta from git, to get more usable custom
radio/checkbox styles with better contrast and borders.
Ember 3 is no longer compatible with PhantomJS, so begin shifting the
test suite to headless Chrome, which should be better anyway.

This requires some changes in some functionality that isn't possible
under Selenium, like setting cookies and setting the language headers.
Since CircleCI's images don't run as root by default, make some
adjustments.
Looks like these environment variables have to be set in the web
interface to work in this substitution context.
CodeMirror seems to behave a bit better in our integration tests, and
since our usage is simple, we'll go ahead and swap the editors.
Our CSS approach to disable animations doesn't seem sufficient for some
reason with headless chrome. So go ahead and disable the fades
completely, which seems to fix this. Others reporting the same behavior:
teamcapybara/capybara#1890 (comment)
Just setting to an empty string wasn't triggering change events, so
computed ember fields weren't properly updating.
The data-toggle option was triggering Bootstrap's default dropdown
behavior, which isn't actually what we want for the datepicker dropdown
(since that library handles dropdowns itself).
GUI added 15 commits November 13, 2018 21:19
With the switch to selenium tests, this was throwing an error.
Bootstrap 4 got rid of the loading state functionality, so implement
this toggling behavior on our own to disable the button and change the
text when submitting. Add tests.
unloadAll seems to be behaving differently after the Ember upgrade,
which was leading to problems in development mode editing the same
record repeatedly (but strangely not in production builds). Fix this by
wrapping the unloadAll in the run loop. Add better test coverage of the
various things this UncachedModel mixin handles.
This didn't always seem to work, and now that Ember has moved the temp
directory storage to the system-wide /tmp, this isn't needed as much.
@GUI GUI merged commit 0bfe84a into master Nov 16, 2018
@GUI GUI deleted the bootstrap4 branch November 16, 2018 17:59
@GUI GUI added this to the v0.15.0 milestone May 12, 2019
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.

2 participants