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

Allow direct sass/less imports from node_modules #1182

Merged
merged 1 commit into from
Nov 26, 2018

Conversation

bravo-kernel
Copy link
Contributor

@bravo-kernel bravo-kernel commented Nov 25, 2018

In my addon, I am currently unable to directly import the sass files and it seems to be caused by the following import statement found at this line: @import 'ember-basic-dropdown';.

This PR separates the import statements by moving the actual markup into base files which allows me to do the following from another addon:

@import "node_modules/ember-basic-dropdown/app/styles/ember-basic-dropdown";
@import "node_modules/ember-power-select/app/styles/ember-power-select/variables";
@import "node_modules/ember-power-select/app/styles/ember-power-select/base";

@bravo-kernel bravo-kernel changed the title Split sass/less sources to allow direct import from node_modules Allow direct sass/less imports from node_modules Nov 25, 2018
@bravo-kernel
Copy link
Contributor Author

This change should be fully backwards-compatible and non-obtrusive. If you need any changes, let me know. Otherwise this should be good to merge.

@cibernox
Copy link
Owner

The code does seems backwards incompatible, however I'd expect you to be able to import styles today. Before approving this, is EPS a devDependency or a runtime dependency of your addon?

@bravo-kernel
Copy link
Contributor Author

I have tested with EPS as both a direct and dev dependency with the exact same result, hence the PR.

It makes sense to me because I am doing addon > addon > app.

Without this PR the following imports fail from my main app. https://github.com/alt3/ember-tabler/blob/power-select/app/styles/ember-tabler.scss

@cibernox cibernox merged commit 6f68907 into cibernox:master Nov 26, 2018
@cibernox
Copy link
Owner

Merged!

@bravo-kernel
Copy link
Contributor Author

Awesome, thanks 💃

@bravo-kernel bravo-kernel deleted the separate-sources branch November 26, 2018 10:32
@cibernox
Copy link
Owner

Published in 2.1.0

@bravo-kernel
Copy link
Contributor Author

👍

kswilster added a commit to salsify/ember-power-select that referenced this pull request Jan 3, 2019
* Resolves typo. (cibernox#1055)

* Added another addon: https://github.com/IliasDeros/ember-data-power-select

* v2.0.0-beta.1

* Fix but by bumping minimum version of ember-basic-dropdown

* selectedItemComponent into beforeOptionsComponent (cibernox#1060)

Make `selectedItemComponent` available in `beforeOptionsComponent`. This will allow for a persistent header showing the overall selected items inside of `power-select-multiple`. This matters in the case where the list ends up scrolling.

* v2.0.0-beta.2

* Fix sandboxing

* Add extra params for trigger (cibernox#1062)

* Add factoryFor in 2.10 ember-try scenario (cibernox#1063)

* Improve test-helpers import path (cibernox#1067)

* Improve test-helpers import path

* Still use ember-native-dom-helpers for find and findAll

* Document new import path

* v2.0.0-beta.3

* Fix bad code sample

* `horizontalPosition` property api reference update (cibernox#1071)

* Update how-to-use-it.hbs (cibernox#1080)

typo

* Update installation.hbs (cibernox#1078)

small typo

* Update installation.hbs (cibernox#1079)

this might be a typo as well

* Update action-handling.hbs (cibernox#1081)

Sorry to submit several PRs. I create them as I encounter typos.
I tried compile only one for action-handling.hbs this time tough ;-)

* stop click propagation added to the docs (cibernox#1087)

* stop click propagation added to the docs

* added more info about stop click propagation in the docs

* Update addon to 3.1 (cibernox#1088)

* Update addon to 3.1

* Smarter way to decide wether or not we want to load jquery

* Modernize test suite part 1 (cibernox#1089)

* Modernize test suite part 2 (cibernox#1090)

* Modernize test suite part 3 (cibernox#1091)

* Modernize test suite part 4 (cibernox#1092)

* Modernize test suite part 5 (cibernox#1093)

* Remove more usages of ember-native-dom-helpers

* Add more qunit-dom

* fixes cibernox#1094 (cibernox#1097)

* qunit-dom is almost everywhere (cibernox#1096)

* v2.0.0-beta.4

* Simplify tests a bit more

* Penultimate test refactor (cibernox#1098)

* Remove all traces of find/findAll from ember-native-dom-helpers

* Changed self.window to window and self.document to document (cibernox#1099)

* v2.0.0-beta.5

* Pre-render docs site at build time (cibernox#1102)

This PR enables Fastboot pre-rendering of the entire docs site using [prember[(https://github.com/ef4/prember). For URL discovery, it's using the newly-published [prember-crawler](https://github.com/ef4/prember-crawler)

I tested the `_redirects` on netlify to confirm it will work, and it does. By default, prember outputs an `_empty.html` file that contains your original (empty) index.html content, since your pre-rendered index.html file will have actual content in it.

* Making helpers more async (cibernox#1100)

* Fix last set of tests

* Add two more tests

* Improve component's behavior in beta (cibernox#1104)

* Fix typo

* Remove native dom helpers (cibernox#1105)

* Remove dependency on ember-native-dom-helpers

* Not used any more

* Update changelog

* v2.0.0

* Update ember-concurrency to fix bug in beta and canary (cibernox#1106)

* Drop node 4

* Add extra params for `selectedItemComponent` on trigger (power-select-multiple) (cibernox#1111)

* Fix: add extra hash to power-select-multiple selectedItemComponent

* Test: Add a couple missing tests for power-select-multiple with custom components

* Test: Update to use new `qunit-dom` test syntax

* v2.0.1

* Remove direct access to then (cibernox#1116)

* v2.0.2

* Remove console-log from test helper (cibernox#1119)

* typo (cibernox#1118)

* Remove console.log from test support (cibernox#1108)

* v2.0.3

* Bind title to the trigger (cibernox#1126)

* Fix tests failing due to new assertion in triggerKeyEvent (cibernox#1129)

* Replaced return value of maybePlaceholder for IE to undefined (cibernox#1128)

* v2.0.4

* Update to ember-cli 3.2 (cibernox#1132)

* Update to 3.3 (cibernox#1137)

* 2.X is not in beta

* guard against destroying hook when calling deactivate (cibernox#1144)

* 2.0.5

* Update to ember-cli 3.4 (cibernox#1149)

* Update to ember-cli 3.4

* Fix template-lint errors

* Update ember-data to 3.4 (cibernox#1150)

* Test and possible fix for cibernox#1147 (cibernox#1151)

* v2.0.6

* Only load polyfill when not in FastBoot environment (cibernox#1155)

fixes cibernox#1154

* v2.0.7

* v2.0.7

* fix: typeof returns string, broke polyfill when necessary (cibernox#1157)

* v2.0.8

* Fix typo in api-reference.hbs (cibernox#1158)

* use .set() to avoid assertion failure under Ember 3.4 (cibernox#1162)

* Add animationEnabled to be passed down to ember-basic-dropdown (cibernox#1165)

* Add highlightOnHoverEnabled to be used in options.js (cibernox#1166)

* Add highlightOnHoverEnabled to be used in options.js

When false, will disable automatically highlighting an option
when hovered over with the mouse. This will prevent unintentionally
selecting a new value when tabbing through a form with an EPS field
while the user's mouse is where the list will appear when the EPS
gains and then looses focus.

* Renamed highlightOnHoverEnabled to highlightOnHover

* v2.0.9

* Change slack for discord (cibernox#1169)

* close -> clone (cibernox#1176)

* close -> clone

'clone' is the intended word in the context, and the spelling error 'close' may cause some confusion to the reader

* spelling error fixes

close -> clone
debounding -> debouncing

just two small mistakes, can be confusing in context for the reader

* Fix build error (cibernox#1178)

* User active-voice instead of passive-voice

* Document using a computed property for the selected property

* Fix build error due to missing rel='noopener'

* Improve documentation (cibernox#1177)

* User active-voice instead of passive-voice

* Document using a computed property for the selected property

* Fix build error due to missing rel='noopener'

* minor typos

* Changed npm and bower for yarn

Changed instructions for contributing from `npm install` and `bower install` to `yarn install` as per cibernox#1179 to reflect updated build tools.

* Fix typo

* Allow select to open with click (cibernox#1181)

* v2.0.10

* v2.0.11

* Fix inconsistent focus of the input in single selects (cibernox#1180)

* v2.0.12

* v2.0.13

* v2.0.14

* v2.0.15

* Fix npm audit warnings (1 critical, 2 high) (cibernox#1183)

* Allow direct imports from node_modules (cibernox#1182)

* v2.1.0

* v2.2.0 (cibernox#1185)

* [BUGFIX] Allow test helpers to work with EBD >=1.0.5 (cibernox#1190)

In EBD 1.0.5 a fix for better a11y was introduced. It makes aria-owns to only be present on the trigger when
the dropdown is open. Test helpers in EPS relied in that property being there all the time, but now
they work both ways.

* v2.2.1

* Specify that only strings are searchable

* Update all dependencies December 2018 (cibernox#1194)

* Update all dependencies December 2018

* Fix sass complaint

* Fix tests

* Replace ember-cli-eslint with plain eslint (cibernox#1195)

* "You attempted to access the `length` property (of <(unknown):ember712>). (cibernox#1148)

Since Ember 3.1, this is usually fine as you no longer need to use `.get()`
to access computed properties. However, in this case, the object in question
is a special kind of Ember object (a proxy). Therefore, it is still necessary
to use `.get('length')` in this case.

If you encountered this error because of third-party code that you don't control,
there is more information at emberjs/ember.js#16148, and
you can help us improve this error message by telling us more about what happened in
this situation."
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