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

Consider supporting elm/url #1140

Open
kmudrick opened this issue Feb 8, 2024 · 4 comments
Open

Consider supporting elm/url #1140

kmudrick opened this issue Feb 8, 2024 · 4 comments
Labels
discussion needed An issue that needs further discussion. good first issue Good for newcomers sdk-extension Add more features to the SDK

Comments

@kmudrick
Copy link
Contributor

kmudrick commented Feb 8, 2024

Is your feature request related to a problem? Please describe.

I'd love to be able to leverage the elm/url package - in particular, the ability to do url encoding and decoding

Describe the solution you'd like

Being able to import/use elm/url or the equivalent from Morphir

I've considered implementing the function I need (percentEncode) in pure elm using the EcmaScript spec for the equivalent (which is what the Elm Kernel seems to use under the covers anyway)

@DamianReeves DamianReeves added discussion needed An issue that needs further discussion. good first issue Good for newcomers sdk-extension Add more features to the SDK labels Feb 8, 2024
@DamianReeves
Copy link
Member

@stephengoldbaum and @AttilaMihaly I actually think exposing a Url type is useful for Morphir, use of a Url for location and indexing concepts have come up in various business scenarios as Url is about addressing not just web work.

I'd be happy to submit a PR to add this.

@stephengoldbaum
Copy link
Member

stephengoldbaum commented Feb 12, 2024 via email

@AttilaMihaly
Copy link
Member

Can we represent a URL as a custom type in user code? Something like this:

type alias URL =
  { scheme : Scheme
  , authority : Authority
  , path : Path
  , query : Query
  , fragment : Fragment
  }

I didn't get into the details of each part because I just wanted to demonstrate the idea.

I think we should start thinking in terms of an extension mechanism that allows people to add new libraries to extend the SDK because otherwise we will have maintenance issues.

@DamianReeves
Copy link
Member

We did try this but there are limits to what we support at the API layer. I think we should consider what are the base types we support so we can move to the model you are suggesting @AttilaMihaly . But I don't think we are there yet, for both UUID and URL we are missing vital parts crucial to constructing these things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion needed An issue that needs further discussion. good first issue Good for newcomers sdk-extension Add more features to the SDK
Projects
None yet
Development

No branches or pull requests

4 participants