GithubHelp home page GithubHelp logo

Comments (18)

rlivsey avatar rlivsey commented on May 16, 2024 5

@balinterdi I think the plan is to decompose link-to into a number of helpers & the routing service along the lines of:

<a href={{url-for "foo"}} class={{active-class "foo"}}>
  Name
</a>

This has the added benefit that url-for & friends can be used outside of the context of rendering a link, eg for passing to components / translation libraries, for more easily setting the active class on container elements etc…

link-to could still exist and just use those smaller building blocks vs implementing everything itself in a black box.

from rfcs.

runspired avatar runspired commented on May 16, 2024 4

component.schedule and route.schedule instead of run.schedule (although mostly this can be achieved without a breaking change, I believe we should deprecate global Ember.run)

from rfcs.

Gaurav0 avatar Gaurav0 commented on May 16, 2024 2

Computed properties without get or set readonly by default?

from rfcs.

nathanhammond avatar nathanhammond commented on May 16, 2024 1

@balinterdi My complaints are mostly that the entirety of link-to should go away. Positional arguments that get turned into content are also really a mess... most of Ember doesn't leverage positional arguments so I want to make that consistent since it's a non-zero logical overhead.

from rfcs.

btecu avatar btecu commented on May 16, 2024
  • Make get and set optional?
  • Make jQuery optional
  • Routable components? :trollface:

Sounds more like a wishlist.

from rfcs.

 avatar commented on May 16, 2024

import Component from '@ember/component' please!

from rfcs.

nathanhammond avatar nathanhammond commented on May 16, 2024

Confirm, these are wishlist items which is why I've not promoted them into the top-post. Y'all please keep this to things that are definitely broken but we can't change without likely breaking peoples applications.

For example, the params thing from my first post: query params clobber path params inside of the params object passed to the model hook. Almost certainly somebody relies on this behavior and fixing it requires separating the namespaces. Since that will change semantics and people will need to adjust where they look for properties it is breaking. That params is lossy is a bug.

This list is for a very specific category of issue.

from rfcs.

nathanhammond avatar nathanhammond commented on May 16, 2024

Updated the top post to describe what we're looking for in this thread. Please review.

from rfcs.

nathanhammond avatar nathanhammond commented on May 16, 2024

The function signature for the existing "routing service" is distinct from the function signature of the same method name on the route and controller.

The existing routing service: transitionTo(routeName, models, queryParams, shouldReplace)

The underlying implementation on routes: transitionTo(routeName, ...models, options)

I feel like I've opened a bug on the second invocation in the past for unrelated reasons, but can't find it.

We should make these consistent.

from rfcs.

knownasilya avatar knownasilya commented on May 16, 2024

Keep inline link-to consistent with block format.

{{link-to Name route}}

vs

{{#link-to route}}
  Name
{{/link-to}}

The order is backwards and gets me every time I use the inline form. I'd expect:

{{link-to route Name}}
{{!-- or for clarity --}}
{{link-to route label=Name}}

from rfcs.

Serabe avatar Serabe commented on May 16, 2024

Classic actions as {{action "actionName"}}

from rfcs.

nathanhammond avatar nathanhammond commented on May 16, 2024

@knownasilya I'm personally of the opinion that all of inline {{link-to}} was a mistake. Also any triple-curly {{{link-to}}}. Also {{#link-to}} in general. I'd instead rather deprecate it entirely, but these changes (as well as your proposals) are beyond the scope of this issue.

@Serabe Your proposal also doesn't meet the bar for this thread, it should almost be something that is an unintended side-effect of a feature's implementation.

Both of y'all's proposals have to do with changing documented public API and that would require a deprecation and process. For future travelers if something has ever appeared in the guides there is no way it will be accepted into the top-posted list as that does not count as a bugfix.

from rfcs.

cibernox avatar cibernox commented on May 16, 2024

@nathanhammond I agree on deprecating inline {{link-to}}
@Gaurav0 Agree on making computed-properties without a get being readonly by default, although probably some changes already in the pipeline for computed-properties when decorators can be used will already achieve that.

Deprecate component.sendAction (perhaps as part of glimmer-components) so people uses closure actions instead.

from rfcs.

balinterdi avatar balinterdi commented on May 16, 2024

As the implementer of the inline link-to I feel intrigued :) I understand why the param order should be brought in line (pun intended) with the block form, but do you think it should be scrapped? It does save some typing and thus potential messing up, doesn't it?

from rfcs.

balinterdi avatar balinterdi commented on May 16, 2024

@nathanhammond Ok, that makes sense. So what is it going to get replaced by?

from rfcs.

balinterdi avatar balinterdi commented on May 16, 2024

@rlivsey Now this makes perfect sense, thank you for the explanation!

from rfcs.

knownasilya avatar knownasilya commented on May 16, 2024

What about emberjs/ember.js#14783 I'd call that a bug, even though some wouldn't.

from rfcs.

sandstrom avatar sandstrom commented on May 16, 2024

@nathanhammond Can we close this issue? I guess it's not relevant anymore

from rfcs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.