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

chore: refactor repeat select template by section #3259

Merged
merged 7 commits into from
Jun 10, 2020

Conversation

freefaller69
Copy link
Contributor

Description

Refactor content placement container to select template based on section. The selectTemplate and selectData functions in the content-placement-container component pass the imported template and data based on the value of the select attribute provided, allowing for removal of the $when function. Section templates have been separated to their own individual files.
Update styling for feature section in content placement container.

Motivation & context

Issue type checklist

  • Chore: A change that does not impact distributed packages.
  • Bug fix: A change that fixes an issue, link to the issue above.
  • New feature: A change that adds functionality.

Is this a breaking change?

  • This change causes current functionality to break.

Adding or modifying component(s) in @microsoft/fast-components checklist

Process & policy checklist

  • I have added tests for my changes.
  • I have tested my changes.
  • I have updated the project documentation to reflect my changes.
  • I have read the CONTRIBUTING documentation and followed the standards for this project.

Copy link
Contributor

@EisenbergEffect EisenbergEffect left a comment

Choose a reason for hiding this comment

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

To my eye, this is much cleaner. This way of factoring things makes it easier to change individual templates or add new ones without really touching existing code (Yay for the open close principle!).

@freefaller69
Copy link
Contributor Author

To my eye, this is much cleaner. This way of factoring things makes it easier to change individual templates or add new ones without really touching existing code (Yay for the open close principle!).

Thanks again for your help in getting me past my last sticking point, @EisenbergEffect.

Copy link
Contributor

@khamudom khamudom left a comment

Choose a reason for hiding this comment

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

smoked

Copy link
Contributor

@SamanthaAO SamanthaAO left a comment

Choose a reason for hiding this comment

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

This is awesome! So much easier to follow. Smoked.

)}
`
)}
${repeat(x => x.selectData(), template)}
Copy link
Collaborator

Choose a reason for hiding this comment

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

neat

@freefaller69 freefaller69 merged commit 4e30a98 into feature/fast-frame Jun 10, 2020
@freefaller69 freefaller69 deleted the users/v-mbenso/select-template branch June 10, 2020 23:11
chrisdholt pushed a commit that referenced this pull request Jun 11, 2020
* implement template select for reusability

* fix feature card columns

* fix feature counter number placement

* fix hover styling in feature section

* update framework template

* Update design system imports

* Consolidate css

Co-authored-by: Michael Benson <[email protected]>
chrisdholt pushed a commit that referenced this pull request Jun 16, 2020
* implement template select for reusability

* fix feature card columns

* fix feature counter number placement

* fix hover styling in feature section

* update framework template

* Update design system imports

* Consolidate css

Co-authored-by: Michael Benson <[email protected]>
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.

6 participants