emberjs / ember.js

Ember.js - A JavaScript framework for creating ambitious web applications
https://emberjs.com
MIT License
22.47k stars 4.21k forks source link

[Documentation] Missing docs for several methods in @ember/helper #20153

Open ef4 opened 2 years ago

ef4 commented 2 years ago

The docs for the @ember/helper module are missing several exports that are public API of that module:

They appear instead in Ember.Templates.helpers.

As we're rolling out handlebars strict mode it becomes important to distinguish between the built-in template keywords like yield and the importable helpers like fn.

SOUMOJIT-CHAKRABORTY commented 1 year ago

Hey! @ef4 I want to help on this, can you give me some more details? I am new to opensource.

ef4 commented 1 year ago

Hi, I think a good way to start with this would be to join the ember discord and ask in the #dev-ember-learning channel. I don't personally know if the learning team already has a plan for how they would like to do this.

SOUMOJIT-CHAKRABORTY commented 1 year ago

Okay, Thank you for your guidance.

jenweber commented 1 year ago

@SOUMOJIT-CHAKRABORTY thanks for volunteering to help! Here's what I think might need to be done:

Next up is to see if changing the for in the missing method to match the for used by invokeHelper is all that is needed. The @for controls where a code comment shows up in the app.

// before
@for Ember.Templates.helpers

// after
@for @ember/helper

Then run the yuidocs build: yarn docs

And inspect the output files to see if the methods you changed show up somewhere in the json. Compare with invokeHelper.

Running the API docs app locally is a little tricky - you need to turn the docs files into JSONAPI following this guide: https://github.com/ember-learn/ember-jsonapi-docs#quickstart

Then in https://github.com/ember-learn/ember-api-docs run start:local. Make sure you are on Node 14 when you npm install, otherwise the app build will fail.

SOUMOJIT-CHAKRABORTY commented 1 year ago

Okay @jenweber , that's a great help🙂

Blueclaus13 commented 1 year ago

is someone working on this issue still?

RyanMuzzey commented 1 year ago

Can this one be closed now that #20408 has been merged?

MichalBryxi commented 1 year ago

I think this is still an issue:

The #20408 talks about moving the helpers around, so maybe they are not supposed to be found on the same spot? Which is fair enough, but then I can't see them in the search either:

Seems like concat is now defined in glimmer/lib/helpers/concat.ts but the 5.4 guides only mention following from @glimmer:

Screenshot 2023-11-09 at 20 27 45