Skip to content

docs: improve glossary for entry-point#29433

Closed
rkirov wants to merge 1 commit into
masterfrom
rkirov-entry-point
Closed

docs: improve glossary for entry-point#29433
rkirov wants to merge 1 commit into
masterfrom
rkirov-entry-point

Conversation

@rkirov
Copy link
Copy Markdown
Contributor

@rkirov rkirov commented Mar 20, 2019

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.io application / infrastructure changes
  • Other... Please describe:

@rkirov rkirov requested review from a team and IgorMinar March 20, 2019 21:41
@rkirov
Copy link
Copy Markdown
Contributor Author

rkirov commented Mar 20, 2019

Had a bit of a debate on what to call the string 'XXX' that goes in the import statement import {...} from 'XXX';, but according to https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import it is the 'module name'. I see you use module ID in your doc, but it has no other mention in the glossary. Your call.

Comment thread aio/content/guide/glossary.md Outdated

Within Angular, use [NgModules](guide/glossary#ngmodule) to make public parts available for import by other NgModules.

A JavaScript module(guide/glossary#module) that is indended to be imported by a user of [a npm package](guide/npm-packages). Usually, it simply reexports symbols from other internal modules. [A npm package](guide/npm-packages) can contain multiple entry-points. For example, the `@angular/core` package has two entry-point modules, which can be imported using the module names - `@angular/core` and `@angular/core/testing`.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

we might also mention that the first one is the "primary entry-point" and the /testing is a "secondary entry-point".

a package can one only zero (unusual) to one primary entry-points, and zero (common) to N secondary entry-points.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

How can a consumer see the - 'primary', 'secondary' distinction? Is in the package.json?

Also is there a system to prevent imports from non-entry-point modules?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copy-edit:
A JavaScript module(guide/glossary#module) intended for import by a user of an npm package. An entry-point module typically re-exports symbols from other internal modules. A package can contain multiple entry-points. For example, the @angular/core package has two entry-point modules, which can be imported using the module names @angular/core and @angular/core/testing.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

copy-edit done. Didn't add 'primary', 'secondary', because I think it needs more clarification.

Comment thread aio/content/guide/glossary.md Outdated

Within Angular, use [NgModules](guide/glossary#ngmodule) to make public parts available for import by other NgModules.

A JavaScript module(guide/glossary#module) that is indended to be imported by a user of [a npm package](guide/npm-packages). Usually, it simply reexports symbols from other internal modules. [A npm package](guide/npm-packages) can contain multiple entry-points. For example, the `@angular/core` package has two entry-point modules, which can be imported using the module names - `@angular/core` and `@angular/core/testing`.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

you might also want to mention that the thing you import from a module/entry-point is a symbol and link to a definition of that (add one in this PR if a definition doesn't exist)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I am afraid that leads into a rabbit hole of JavaScript semantics - for one import {A, B} from ... imports multiple symbols. Can we expect basic ES modules knowledge?

Copy link
Copy Markdown
Contributor

@jbogarthyde jbogarthyde Apr 9, 2019

Choose a reason for hiding this comment

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

Perhaps:
The import operation results in a Symbol value for each item imported from the entry-point module.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Unless I am mistaked, ES6 Symbols (https://developer.mozilla.org/en-US/docs/Glossary/Symbol) have nothing to do with ES6 Module names, which is another good reason not to use the word symbol when talking about modules.

@IgorMinar
Copy link
Copy Markdown
Contributor

IgorMinar commented Mar 20, 2019

Had a bit of a debate on what to call the string 'XXX' that goes in the import statement import {...} from 'XXX';, but according to https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import it is the 'module name'. I see you use module ID in your doc, but it has no other mention in the glossary. Your call.

We can standardize on "module name" and remove references to "module id" if we can validate that also one more place uses that terminology - e.g. TypeScript.

I think we use moduleId or id as prop name in some apis so we should weigh in the cost of renaming that. But using standard terminology is very important so we should swallow that cost if necessary as long as we plan the change well. As far as I can tell, it's just these two places and in both cases the property is about to become obsolete for unrelated reasons:

@ngbot ngbot Bot added this to the needsTriage milestone Mar 21, 2019
@jenniferfell jenniferfell requested a review from jbogarthyde April 2, 2019 22:16
@jenniferfell jenniferfell added docsarea: terminology feature Label used to distinguish feature request from other issues effort2: days risk: medium labels Apr 2, 2019
@ngbot ngbot Bot modified the milestones: needsTriage, Backlog Apr 2, 2019
@jenniferfell
Copy link
Copy Markdown
Contributor

@jbogarthyde : Hi. As docs lead for the glossary work, I just wanted to make sure you have a chance to see this. Also, please help shepherd this through the process as needed. Thanks!

Comment thread aio/content/guide/glossary.md Outdated

Within Angular, use [NgModules](guide/glossary#ngmodule) to make public parts available for import by other NgModules.

A JavaScript module(guide/glossary#module) that is indended to be imported by a user of [a npm package](guide/npm-packages). Usually, it simply reexports symbols from other internal modules. [A npm package](guide/npm-packages) can contain multiple entry-points. For example, the `@angular/core` package has two entry-point modules, which can be imported using the module names - `@angular/core` and `@angular/core/testing`.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copy-edit:
A JavaScript module(guide/glossary#module) intended for import by a user of an npm package. An entry-point module typically re-exports symbols from other internal modules. A package can contain multiple entry-points. For example, the @angular/core package has two entry-point modules, which can be imported using the module names @angular/core and @angular/core/testing.

Comment thread aio/content/guide/glossary.md Outdated

Within Angular, use [NgModules](guide/glossary#ngmodule) to make public parts available for import by other NgModules.

A JavaScript module(guide/glossary#module) that is indended to be imported by a user of [a npm package](guide/npm-packages). Usually, it simply reexports symbols from other internal modules. [A npm package](guide/npm-packages) can contain multiple entry-points. For example, the `@angular/core` package has two entry-point modules, which can be imported using the module names - `@angular/core` and `@angular/core/testing`.
Copy link
Copy Markdown
Contributor

@jbogarthyde jbogarthyde Apr 9, 2019

Choose a reason for hiding this comment

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

Perhaps:
The import operation results in a Symbol value for each item imported from the entry-point module.

@brandonroberts
Copy link
Copy Markdown
Contributor

@rkirov will you rebase on master?

Copy link
Copy Markdown
Contributor

@jbogarthyde jbogarthyde left a comment

Choose a reason for hiding this comment

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

Please make the copy-edit changes.

@rkirov rkirov force-pushed the rkirov-entry-point branch 2 times, most recently from 639eef1 to 1551920 Compare May 28, 2019 17:53
@rkirov
Copy link
Copy Markdown
Contributor Author

rkirov commented May 28, 2019

Rebased and added copy-edits.

Copy link
Copy Markdown
Contributor

@jbogarthyde jbogarthyde left a comment

Choose a reason for hiding this comment

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

a couple of typos

Comment thread aio/content/guide/glossary.md Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

indented -> intended

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

Comment thread aio/content/guide/glossary.md Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

entry-points -> entry points
(hyphen only when used as an adjective)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

@rkirov rkirov force-pushed the rkirov-entry-point branch from 1551920 to ad66716 Compare May 28, 2019 18:24
Copy link
Copy Markdown
Contributor

@jbogarthyde jbogarthyde left a comment

Choose a reason for hiding this comment

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

One of the typos still there, sorry.

Comment thread aio/content/guide/glossary.md Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Still not corrected -- "indented" -> "intended"

Copy link
Copy Markdown
Contributor Author

@rkirov rkirov May 28, 2019

Choose a reason for hiding this comment

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

lol, fixed. Thanks for being thorough.

@rkirov rkirov force-pushed the rkirov-entry-point branch from ad66716 to 8a68ec0 Compare May 28, 2019 20:35
Copy link
Copy Markdown
Contributor

@jbogarthyde jbogarthyde left a comment

Choose a reason for hiding this comment

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

LGTM

@jbogarthyde jbogarthyde added the merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note label May 28, 2019
@ngbot ngbot Bot added the action: merge The PR is ready for merge by the caretaker label May 28, 2019
@ngbot
Copy link
Copy Markdown

ngbot Bot commented May 28, 2019

I see that you just added the PR action: merge label, but the following checks are still failing:
    failure status "ci/circleci: test_aio" is failing
    pending missing required labels: PR target: *
    pending status "ci-codefresh-bazel" is pending
    pending 2 pending code reviews

If you want your PR to be merged, it has to pass all the CI checks.

If you can't get the PR to a green state due to flakes or broken master, please try rebasing to master and/or restarting the CI job. If that fails and you believe that the issue is not due to your change, please contact the caretaker and ask for help.

@jbogarthyde
Copy link
Copy Markdown
Contributor

Apparently failing because it doesn't come from a forked repo. Please help.

@matsko matsko added the target: patch This PR is targeted for the next patch release label May 30, 2019
@matsko matsko closed this in a2d26c6 May 30, 2019
matsko pushed a commit that referenced this pull request May 30, 2019
@angular-automatic-lock-bot
Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators Sep 15, 2019
@IgorMinar IgorMinar deleted the rkirov-entry-point branch June 9, 2020 20:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker cla: yes effort2: days feature Label used to distinguish feature request from other issues merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note risk: medium target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants