Skip to content

refactor(compiler): introduce InterpolationConfig#8906

Closed
lacolaco wants to merge 1 commit intoangular:masterfrom
lacolaco:laco-parser-config-interpolate
Closed

refactor(compiler): introduce InterpolationConfig#8906
lacolaco wants to merge 1 commit intoangular:masterfrom
lacolaco:laco-parser-config-interpolate

Conversation

@lacolaco
Copy link
Copy Markdown
Contributor

@lacolaco lacolaco commented May 29, 2016

Please check if the PR fulfills these requirements

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

What is the current behavior? (You can also link to an open issue here)

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...

CompilerConfig takes interpolation arguments as InterpolationConfig type.

Other information:

ref. #8865

CompilerConfig has a configuration of interpolation for the parser.
InterpolationConfig has two property; startSymbol and endSymbol.

InterpolationRegexp of the parser will be created with its symbols.

@lacolaco
Copy link
Copy Markdown
Contributor Author

@vicb I introduced InterpolationConfig as the first step to support i18n parser. Please let me know your opinion on this.

cc/ @mhevery

@lacolaco lacolaco force-pushed the laco-parser-config-interpolate branch 3 times, most recently from c9749d4 to 0ad55cf Compare May 29, 2016 16:56
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.

DEFAULT

@vicb
Copy link
Copy Markdown
Contributor

vicb commented May 31, 2016

@laco0416 LGTM with some minor comments.

Do you plan to amend this PR with i18n / submit a new one ?

@vicb vicb added pr_state: LGTM action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews labels May 31, 2016
@lacolaco
Copy link
Copy Markdown
Contributor Author

@vicb yes. I'll include i18n paraer changes.
2016/06/01 2:00 "Victor Berchet" [email protected]:

@laco0416 https://github.com/laco0416 LGTM with some minor comments.

Do you plan to amend this PR with i18n / submit a new one ?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#8906 (comment), or mute
the thread
https://github.com/notifications/unsubscribe/ABdVXDvUrmUV0vEFysGA1SFwKafonL8sks5qHGkqgaJpZM4IpU61
.

@lacolaco lacolaco changed the title refactor(compiler): introduce InterpolationConfig [WIP] refactor(compiler): introduce InterpolationConfig May 31, 2016
@lacolaco lacolaco force-pushed the laco-parser-config-interpolate branch from 0ad55cf to d53e98e Compare May 31, 2016 22:10
@lacolaco
Copy link
Copy Markdown
Contributor Author

lacolaco commented May 31, 2016

  • Introduce InterpolationConfig to Parser
  • Clean up
  • Apply this to I18nHTMLParser

@lacolaco lacolaco force-pushed the laco-parser-config-interpolate branch from d53e98e to 191e2e1 Compare May 31, 2016 22:29
@lacolaco lacolaco changed the title [WIP] refactor(compiler): introduce InterpolationConfig refactor(compiler): introduce InterpolationConfig May 31, 2016
@lacolaco
Copy link
Copy Markdown
Contributor Author

@vicb It's done. Please review again! :)

@lacolaco
Copy link
Copy Markdown
Contributor Author

Travis red is in saucelabs flaky test.

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.

Dowe need to export, if not you'd better create the obj lazily

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.

Totally. :P

@lacolaco lacolaco force-pushed the laco-parser-config-interpolate branch from cf6a0c1 to 527d1ff Compare June 1, 2016 01:47
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.

Can I use const here?

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.

yep

@vicb
Copy link
Copy Markdown
Contributor

vicb commented Jun 1, 2016

@laco0416 thanks for your work. I have added a question.

Could you please squash your 2 commits & rebase.

@vicb
Copy link
Copy Markdown
Contributor

vicb commented Jun 1, 2016

thinking more about this, the symbols could not be part of the compiler config but must be part of the @Component to be able to mix & match different symbols.

@lacolaco
Copy link
Copy Markdown
Contributor Author

lacolaco commented Jun 1, 2016

@vicb

thinking more about this, the symbols could not be part of the compiler config but must be part of the @Component to be able to mix & match different symbols.

So, the compiler has {{}} as a default symbols, and each component has own symbols for override behavior of the compiler... This approach is similar to encapsulation, right?

`CompilerConfig` has a configuration of interpolation for Parser and I18nHTMLParser.
`InterpolationConfig` has two properties; `startSymbol` and `endSymbol`.

InterpolationRegexp of the parser will be created with its symbols.
@lacolaco lacolaco force-pushed the laco-parser-config-interpolate branch from 527d1ff to 3eb2748 Compare June 1, 2016 23:13
@lacolaco
Copy link
Copy Markdown
Contributor Author

lacolaco commented Jun 1, 2016

For that, we must modify the compiler system entirely. I think that is out of this PR... ;(

@vicb
Copy link
Copy Markdown
Contributor

vicb commented Jun 2, 2016

For that, we must modify the compiler system entirely. I think that is out of this PR... ;(

Either we should revert the partial impl that is currently in master or do the full support (component based).

Would you like to work on that ? We should have the feature soon if we want it in 2.0.0. However it could come in a further release.

@lacolaco
Copy link
Copy Markdown
Contributor Author

lacolaco commented Jun 2, 2016

Ok, let's revert current impl. you can?
This is not needed as final, I think too.

@vicb
Copy link
Copy Markdown
Contributor

vicb commented Jun 2, 2016

Yes I'll do that.

@lacolaco
Copy link
Copy Markdown
Contributor Author

lacolaco commented Jun 2, 2016

Thank you. I close here and create new PR as a feature commit.

@lacolaco lacolaco closed this Jun 2, 2016
@lacolaco lacolaco deleted the laco-parser-config-interpolate branch July 7, 2018 06:43
@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 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews cla: yes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants