Skip to content

Conversation

GreatWizard
Copy link

Hello,

This PR is here to be able to used unamed action :)

And I take a look into buildUrl mixin to replace jquery-params by the native URL API.
There is a polyfills for old browser thanks to ember-url (because URL polyfills is not handle by babel).

What do you think?

@GreatWizard GreatWizard changed the title Replace jquery-params with URL API and authorize undefined action name Replace jquery-params with URL API and authorize unamed action name Nov 23, 2018
let pathUrl = url.charAt(url.length - 1) === '/' ? `${url}${path}` : `${url}/${path}`;

return query ? `${pathUrl}?${query}` : pathUrl;
let urlObj = new URL(url, window.location.origin);
Copy link
Member

Choose a reason for hiding this comment

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

This will not work in fastboot :/ There is no window object

Copy link
Contributor

Choose a reason for hiding this comment

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

@GreatWizard Since we don't care about the host name here, I'd recommend using a dummy hostname.

let urlObj = new URL(url, 'https://example.com');

"ember-cli-babel": "6.16.0",
"ember-cli-cjs-transform": "1.3.0",
"jquery-param": "1.0.1",
"ember-url": "^0.6.0",
Copy link
Member

Choose a reason for hiding this comment

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

Please use strict version :) without ^ or only as ~`

@sandstrom
Copy link
Contributor

@GreatWizard Good PR! There only seems to be a few minor things + a rebase to get this working.

@GreatWizard
Copy link
Author

GreatWizard commented Apr 30, 2020

I'm sorry I have to recreate the PR because I delete all my forks on my account recently and I haven't see there is still an open PR onto ember-custom-actions... :/

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.

3 participants