Skip to content

RFC #635: ember new --lang - #9259

Merged
rwjblue merged 2 commits into
ember-cli:masterfrom
josephdsumner:ember-new-lang-rfc
Aug 24, 2020
Merged

rwjblue merged 2 commits into
ember-cli:masterfrom
josephdsumner:ember-new-lang-rfc

Conversation

@josephdsumner

@josephdsumner josephdsumner commented Jun 13, 2020 •

Copy link
Copy Markdown
Contributor

@rwjblue @MelSumner @hergaiety @jgwhite

I'm so excited to see the decision to move forward with RFC #635 and get started on working through this!

This is an updated rebase + squash of the feature branch that was developed within the Ember.js Accessibility Strike Team and proposed as a candidate implementation in the RFC. There have been a few updates since the RFC was first submitted, and of course, some changes to make per review. To the best of my knowledge, this is an accurate, aggregate summary of action items:

From last st-a11y review:

  • rebase + squash onto ember-cli master as a working starting point + make sure recent blueprint changes are resolved

  • tidy up evaluation for html tag in index.html
    -- @rwjblue you mentioned a 'one-liner' for this, I think I understood what you meant

  • update the coverage for programming languages to include file extensions, abbreviations, etc.
    -- found + marked edge cases

  • change util logic to check for misuse cases first
    -- will need to be updated for edges per review

  • Update description / help for addon command
    -- clarify that it is the dummy app getting the lang value assigned

  • Test coverage: index-test.html

  • Test coverage: put entire file in fixtures for index.html
    -- read result file, confirm it matches full expected result (long String, literal, etc.)

  • Change default type/value from empty String to undefined

From RFC Discussion (briefly):

  • Handling of edge cases (valid language code and programming language abbreviation)

  • Handling of error messages (verbosity)

  • Handling of error work flow (misuse cases: when to build, when to break, etc.)

  • An appropriate implementation for working around the out-of-scope parser bug

Comment thread lib/commands/init.js Resolved
@hergaiety

Copy link
Copy Markdown

When this is finished and merged I'd love to follow-up with an update to the Ember guides with a mention of how to use Ember CLI to specify the language on guides/release/accessibility/application-considerations.md under the Lang Attribute section.

@rwjblue rwjblue left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for working on this! Sorry it took me so long to review, looks great overall I left a few inline comments / suggestions to work through.

Comment thread blueprints/addon/index.js Resolved
Comment thread blueprints/app/index.js Resolved
Comment thread lib/commands/addon.js Resolved
Comment thread lib/commands/init.js Resolved
Comment thread lib/commands/init.js Resolved
Comment thread tests/unit/commands/init-test.js Resolved
Comment thread tests/unit/commands/init-test.js Resolved
Comment thread tests/unit/commands/new-test.js Resolved
Comment thread tests/unit/commands/new-test.js Resolved
Comment thread tests/unit/commands/init-test.js Resolved
Comment thread lib/commands/new.js Resolved
Comment thread lib/commands/new.js Resolved
Comment thread lib/utilities/valid-lang-flag.js Resolved
@rwjblue

rwjblue commented Jul 24, 2020

Copy link
Copy Markdown
Member

Also went through and resolved the comments that have already been addressed...

@josephdsumner

Copy link
Copy Markdown
Contributor Author

Also went through and resolved the comments that have already been addressed...

Thank you so much -- feel free to wait for a request for re-review as I consolidate the cleanup :)

@josephdsumner

Copy link
Copy Markdown
Contributor Author

@rwjblue Requesting a re-review with the hope that the following have been resolved:

  • test consolidation into acceptance/new-test
  • command logic consolidation into init
  • error handling moved directly to the valid-lang-flag utility
  • extraneous comment removal

AFAIK, that would take care of a lot of the architectural cleanup, but would still leave at least few more TODOs to reach the MVP. There's probably a missing item or two here, but it should become much more apparent what those are with the above taken care of first:

  • addon help text (can do)
  • index-test tests (suggestion would be helpful here)
  • utility update: implementation to match whatever consensus was reached re: when to break and what to report. For example, what do to when there's a valid human AND programming language overlap. The latest info I have is from the RFC comment section itself, but have no idea whether or not framework agreed on a spec, etc.

@josephdsumner
josephdsumner requested a review from rwjblue July 27, 2020 18:43
@rwjblue

rwjblue commented Jul 29, 2020

Copy link
Copy Markdown
Member

implementation to match whatever consensus was reached re: when to break and what to report. For example, what do to when there's a valid human AND programming language overlap. The latest info I have is from the RFC comment section itself, but have no idea whether or not framework agreed on a spec, etc.

We decided to emit a warning instead of an error, and continue along using the user provided value.

@josephdsumner

Copy link
Copy Markdown
Contributor Author

implementation to match whatever consensus was reached re: when to break and what to report. For example, what do to when there's a valid human AND programming language overlap. The latest info I have is from the RFC comment section itself, but have no idea whether or not framework agreed on a spec, etc.

We decided to emit a warning instead of an error, and continue along using the user provided value.

Thanks! I will make that the model for all the mis-use cases:

  • log warning (issue description)
  • log result (inform user about what will happen in index.html)
  • log help-related info
  • never break
  • only assign lang if valid used properly

@rwjblue rwjblue left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looking really good, only a few things left.

Comment thread lib/commands/addon.js Resolved
Comment thread lib/commands/init.js Resolved

@MelSumner MelSumner left a comment

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.

Really great work- soooo excited to see this ship! 👍 💯

josephdsumner and others added 2 commits August 21, 2020 10:57
* Remove `package-lock.json`
* Remove `-l` short alias
@rwjblue
rwjblue force-pushed the ember-new-lang-rfc branch from 483fee4 to f7d76e9 Compare August 24, 2020 17:49
@rwjblue

rwjblue commented Aug 24, 2020

Copy link
Copy Markdown
Member

I've just rebased / squashed things down here in prep for getting this landed. I've also removed the -l shorthand based on convo with a few folks.

This should be good to go once CI is happy, great work here folks!

@rwjblue
rwjblue merged commit 0e4e318 into ember-cli:master Aug 24, 2020
@josephdsumner

Copy link
Copy Markdown
Contributor Author

So great to see this land!
@MelSumner @rwjblue @jgwhite @hergaiety and the rest of the strike team --
Thank you all so much for all of the time and effort devoted to guidance and review!

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.

5 participants