Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core): compile field-label only once #298

Merged
merged 1 commit into from
Feb 11, 2021

Conversation

josokinas
Copy link
Contributor

Purpose

Following #293 main compilation of all components is wrong, as conditional inclusion uses includes for keeping a map of what has been included.

Approach

Rollback to checking for whether "field-label" was already included.

Another option is to exclude this component from a list of all components completely, however then we might introduce a bug when "field-label" is removed from both "input" and "textarea".

Testing

Tested local build.

Risks

N/A

@josokinas josokinas requested a review from rabelloo February 10, 2021 16:37
@josokinas josokinas self-assigned this Feb 10, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Feb 10, 2021

🎊 PR Preview 4b4bb46 has been successfully built and deployed to https://onfido-castor-preview-pr-298.surge.sh

🕐 Build time: 109.234s

🤖 By surge-preview

Copy link
Contributor

@rabelloo rabelloo left a comment

Choose a reason for hiding this comment

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

Right, we forgot about this.
Unless we check whether or not it has been included, it won't be set.

Yet another option is doing something like

@mixin FieldLabel() {
  includes.the('field-label');
}

Which means it marks itself as included when called.

But I'm happy with the current.

@josokinas
Copy link
Contributor Author

Which means it marks itself as included when called.

That's actually a good suggestion.

Maybe each component by default could mark itself included.

Let's see later if we have another situation of such, then we can implement something a little more smart.

@josokinas josokinas merged commit 055fcdd into main Feb 11, 2021
@josokinas josokinas deleted the fix/compile-field-label-only-once branch February 11, 2021 10:34
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.

2 participants