Commit Graph

87 Commits

Author SHA1 Message Date
David Taylor e16c8ea2e7
DEV: Support inline-hbs compilation in themes (#18112)
This commit makes a number of improvements to the DiscourseJsProcessor:

1. Remove dependence on the out-of-date Ember template compiler from the ember-rails gem; switch to modern template compiler
2. Refactor to make use of a proper module system with `define`/`require`
3. Introduce `babel-plugin-ember-template-compilation` to enable inline hbs compilation

The `mini-loader` is upgraded to support relative lookup and `require.has`, so that these new JS packages work correctly.
2022-08-29 19:53:42 +01:00
David Taylor 1bd1664ae0
DEV: Compile markdown-it-bundle with ember-cli (#18104)
We were already compiling the markdown bundle via ember-cli, but that version was only being used in the test environment. This commit improves the implementation, and updates the filename so it's also used in production.

This commit also
- Removes the vendored copy of `markdown-it.js` and fetches from node_modules instead
- Updates `pretty_text.rb` to remove the custom sprockets-manifest-parsing
- Removes `pretty-text-bundle.js`, which was only being used by `pretty_text.rb`
2022-08-29 19:11:59 +01:00
Penar Musaraj 4116bce902
DEV: Add A11Y-friendly dialog addon (#18028)
This adds a new framework for accessible dialogs that will eventually replace bootbox. Under the hood, it uses the a11y-dialog package and an in-repo Ember addon. See PR for usage details.
2022-08-29 13:59:57 -04:00
David Taylor e4de738f59
DEV: Introduce on-resize modifier and service (#17935)
This commit introduces a new `{{on-resize}}` modifier along with its companion `resize-observer` Service. These automatically take care of setting up the observer and handling cleanup.
2022-08-16 10:39:42 +08:00
David Taylor 7f9c2c0bfb
DEV: Remove vendored babel and update config for plugins/themes (#17832)
The new plugin list is based on the ones currently used in our ember-cli pipeline, and are based on our official browser support policy.

This commit includes an update to the raw-handlebars compiler to remove the 'very hacky but lets us use ES6' code. It's  served us well for the last 6 years, but the babel config changes broke it (`const` -> `let`). This commit takes the opportunity to refactor it to take a similar approach to PrettyText, by leaning on `mini-loader.js`.
2022-08-09 11:53:24 +01:00
Jarek Radosz ff16ba1fc0
DEV: Update `@embroider/test-setup` (#17625) 2022-07-24 17:29:21 +02:00
David Taylor 327dd0beb3
DEV: Install `ember-modifier` and `@ember/render-modifiers` (#17595)
`ember-modifier` provides APIs to write our own modifiers. `@ember/render-modifiers` provides some simple `did-insert`, `did-update` and `will-destroy` modifiers.

Upcoming `ember-modifier` deprecations have been set to 'throw' in our deprecation-workflow config to ensure we don't accidently start using deprecated behaviour.
2022-07-21 18:12:29 +01:00
Jarek Radosz 0948a59c3f
DEV: Update all `uppy` deps (#17542) 2022-07-19 13:05:07 +02:00
David Taylor 13bc2f1f39 DEV: Upgrade to Ember 3.28 2022-07-19 10:00:59 +01:00
Joffrey JAFFEUX ab05d931a0
DEV: updates popper to 2.11.5 (#17522)
This commit also removes a modifier used in select-kit which was causing issues with this update and doesn’t appear to be needed anymore.
2022-07-18 11:06:19 +02:00
Jarek Radosz 0f3109cc53
Revert "DEV: Update `@popperjs/core` (#17437)" (#17448)
This reverts commit 76bb8f8926.

There is a dropdown positioning regression that needs to be investigated.
2022-07-12 15:27:52 +02:00
Jarek Radosz 76bb8f8926
DEV: Update `@popperjs/core` (#17437) 2022-07-12 13:16:00 +02:00
Jarek Radosz 365f558bda
DEV: Update `ember-resolver` (#17432) 2022-07-11 22:52:01 +02:00
Jarek Radosz 006de01943
DEV: Update `ember-cli-handlebars` (#17429) 2022-07-11 22:25:40 +02:00
Jarek Radosz 2414a175cf
DEV: Update `message-bus-client` (#17421)
This update covers commits:

* e309b6d [BREAKING Make JS client throw if lastId not number](e309b6d533)
* f0bae69 [DEV: removes dead code](f0bae695b0)
* a72b930 [FIX: force a poll more consistently when visibility changes](a72b9308b4)
* 5c01715 [Permit CORS preflight caching](5c01715432)
* 1789784 [DEV: lint files](17897843b4)
* b9cfb90 [FIX: do not leak visibility event subscriptions on stop/start](b9cfb90dd6)
2022-07-11 13:09:30 +02:00
Jarek Radosz 4437579a8c
DEV: Update `ember-qunit` (#17251) 2022-07-11 12:40:48 +02:00
Jarek Radosz 25dacc08ce
DEV: Update @ember/test-helpers (#17247) 2022-07-11 01:54:25 +02:00
Jarek Radosz d5dc2496d4
DEV: Update `qunit` (#17411) 2022-07-10 10:52:14 +02:00
David Taylor fc36ac6cde
DEV: Modernize Ember Resolver (#17353)
This switches us to use the modern ember resolver package, and re-implements a number of our custom resolution rules within it. The legacy resolver remains for now, and is used as a fallback if the modern resolver is unable to resolve a package. When this happens, a warning will be printed to the console.

Co-authored-by: Peter Wagenet <peter.wagenet@gmail.com>
2022-07-06 14:20:00 +01:00
Jarek Radosz f7c133ac74
DEV: Update `sass` (#17349) 2022-07-06 10:35:55 +02:00
Jarek Radosz aa7792cf93
DEV: Use npm bootstrap (#17315) 2022-07-04 11:36:51 +02:00
Peter Wagenet 82d7e76d52
Set up ember-cli-deprecation-workflow (#17268)
Let's get the ball rolling! 😃
2022-07-01 23:43:40 +02:00
Jarek Radosz 809f3d37cd
DEV: Update `qunit-dom` (#17265) 2022-06-28 21:22:17 +02:00
Jarek Radosz 302fab07a3
DEV: Update `jsdom` (#17264) 2022-06-28 21:22:06 +02:00
Jarek Radosz bfeee1b803
DEV: Update `sinon` (#17266) 2022-06-28 21:21:51 +02:00
Jarek Radosz 4821d44c3c
DEV: Update `webpack` (#17262) 2022-06-28 14:39:09 +02:00
Jarek Radosz 94e59ad9b6
DEV: Update `html-entities` (#17250) 2022-06-27 18:40:58 +02:00
Jarek Radosz f8691d12e1
DEV: Update `ember-cli-app-version` (#17253) 2022-06-27 18:13:56 +02:00
Jarek Radosz f505221a9c
DEV: Update `ember-cli-terser` (#17252) 2022-06-27 18:13:46 +02:00
Jarek Radosz 1344e7d62c
DEV: Update `js-yaml` (#17249) 2022-06-27 18:13:29 +02:00
Jarek Radosz 6a2ea012c7
DEV: Update `@glimmer/tracking` (#17248) 2022-06-27 18:13:04 +02:00
Jarek Radosz bd85c15acb
DEV: Update broccoli-babel-transpiler (#17221)
Fixes concurrent addon build lockups.
2022-06-24 10:48:05 +02:00
Jarek Radosz d1d6868325
DEV: Update xss.js (#17216)
* DEV: Update xss.js

* Fix our hack
2022-06-24 10:28:05 +08:00
Jarek Radosz f27dddd405
DEV: Make addons buildable on their own (#17205) 2022-06-23 22:19:54 +02:00
Jarek Radosz 16550537d0
DEV: Drop ember-maybe-import-regenerator (#17195)
I believe it's no longer needed on the browsers we support
2022-06-23 15:20:10 +02:00
Jarek Radosz 3cb67fcb6c
DEV: Update ember-cli-htmlbars (#17194) 2022-06-23 14:36:50 +02:00
Jarek Radosz 56d3bd5bdd
DEV: Update `@glimmer/component` (#17197) 2022-06-23 13:35:42 +02:00
Jarek Radosz b09cce6897
DEV: Update ember-source-channel-url (#17196) 2022-06-22 00:12:43 +02:00
Jarek Radosz 06feeed187
DEV: Update `@ember/optional-features` (#17193) 2022-06-22 00:12:33 +02:00
Jarek Radosz 216663effa
DEV: Update ember-cli-dependency-checker (#17192) 2022-06-22 00:12:24 +02:00
Jarek Radosz b50056a9f3
DEV: Update ember-cli-inject-live-reload (#17191) 2022-06-22 00:12:15 +02:00
Jarek Radosz 1e522b0ee7
DEV: Update ember-buffered-proxy (#17190) 2022-06-22 00:12:04 +02:00
Jarek Radosz 9cb9d1105e
DEV: Update ember-auto-import (#17176) 2022-06-21 22:06:41 +02:00
Isaac Janzen 41028a84ef
DEV: add deprecation notice to `isLegacyEmber` (#17186) 2022-06-21 14:08:12 -05:00
Jarek Radosz def39b2d58
DEV: Update `@babel/core` (#17163) 2022-06-21 12:48:44 +02:00
Jarek Radosz d58a1e180d
DEV: Update ember-try to 2.0.0 (#16606) 2022-05-03 11:04:16 -04:00
Joffrey JAFFEUX fad94160c7
FIX: uses tippy for popover (#15409)
Note this commit also introduce a new {{d-popover}} component, example usage:

```hbs
{{#d-popover |state|}}
  {{d-button label="foo.things" class="d-popover-trigger"}}

  <div class="d-popover-content">
    Some content
  <div>
{{/d-popover}}
```
2022-05-02 17:10:26 +02:00
David Taylor 22a7905f2d
DEV: Allow Ember CLI assets to be used by development Rails app (#16511)
Previously, accessing the Rails app directly in development mode would give you assets from our 'legacy' Ember asset pipeline. The only way to run with Ember CLI assets was to run ember-cli as a proxy. This was quite limiting when working on things which are bypassed when using the ember-cli proxy (e.g. changes to `application.html.erb`). Also, since `ember-auto-import` introduced chunking, visiting `/theme-qunit` under Ember CLI was failing to include all necessary chunks.

This commit teaches Sprockets about our Ember CLI assets so that they can be used in development mode, and are automatically collected up under `/public/assets` during `assets:precompile`. As a bonus, this allows us to remove all the custom manifest modification from `assets:precompile`.

The key changes are:
- Introduce a shared `EmberCli.enabled?` helper
- When ember-cli is enabled, add ember-cli `/dist/assets` as the top-priority Rails asset directory
- Have ember-cli output a `chunks.json` manifest, and teach `preload_script` to read it and append the correct chunks to their associated `afterFile`
- Remove most custom ember-cli logic from the `assets:precompile` step. Instead, rely on Rails to take care of pulling the 'precompiled' assets into the `public/assets` directory. Move the 'renaming' logic to runtime, so it can be used in development mode as well.
- Remove fingerprinting from `ember-cli-build`, and allow Rails to take care of things

Long-term, we may want to replace Sprockets with the lighter-weight Propshaft. The changes made in this commit have been made with that long-term goal in mind.

tldr: when you visit the rails app directly, you'll now be served the current ember-cli assets. To keep these up-to-date make sure either `ember serve`, or `ember build --watch` is running. If you really want to load the old non-ember-cli assets, then you should start the server with `EMBER_CLI_PROD_ASSETS=0`. (the legacy asset pipeline will be removed very soon)
2022-04-21 16:26:34 +01:00
Jarek Radosz 77fed8dfc3
DEV: Update xss.js package (#16398) 2022-04-06 22:49:13 +02:00
Penar Musaraj 147ffadcf3
DEV: Update Uppy to 2.1.6 (#16227) 2022-03-23 09:28:55 -04:00