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

Enhance FluentAccordionItem with Flexible HeadingContent Parameter #952

Merged
merged 6 commits into from
Nov 13, 2023

Conversation

LuohuaRain
Copy link
Contributor

@LuohuaRain LuohuaRain commented Nov 13, 2023

Pull Request

📖 Description

image

I've updated the FluentAccordionItem component to enhance its flexibility and usability. Previously, attempting to control the heading slot resulted in a RZ2012 error. To address this issue, I've made the following changes:

  1. Removed the EditorRequiredAttribute to avoid the RZ2012 error.
  2. Introduced a new RenderFragment? parameter, HeadingContent, providing an alternative way to specify the heading content. This addition allows users to define custom heading content more flexibly.

🎫 Issues

👩‍💻 Reviewer Notes

📑 Test Plan

✅ Checklist

General

  • 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.

Component-specific

  • I have added a new component
  • I have added Unit Tests for my new compontent
  • I have modified an existing component
  • I have validate Unit Tests for an existing component

⏭ Next Steps

@dvoituron
Copy link
Collaborator

Thank you for this useful improvement.
Can you fix the unit tests that no longer work?
And add a test to validate the use of HeadingContent?

@LuohuaRain
Copy link
Contributor Author

Thank you for this useful improvement. Can you fix the unit tests that no longer work? And add a test to validate the use of HeadingContent?

Of course, I'll give a try. 😊

@LuohuaRain
Copy link
Contributor Author

Hi,
I've just pushed some commits related to unit testing. As this is my initial attempt at writing unit tests (bUnit), there might be areas for improvement. I would greatly appreciate your feedback and suggestions to enhance the quality of these tests.

Thank you🚀

@vnbaaij
Copy link
Collaborator

vnbaaij commented Nov 13, 2023

I'm looking at the tests now. So far, looking good!
Can you please rename the HeaderContent name to HeaderTemplate. That is more consistent with how we do it in other places in the library. Also, add in the XML comments only one should be used and which one takes precedence if someone does use both.

Copy link
Collaborator

@vnbaaij vnbaaij left a comment

Choose a reason for hiding this comment

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

Ok, we are taking the the PR as-is and change the parameter name ourselves. Thanks!!

@vnbaaij vnbaaij merged commit c81efc3 into microsoft:dev Nov 13, 2023
1 check passed
@LuohuaRain
Copy link
Contributor Author

Sorry, due to the time difference, I went out for dinner, and it took some time. Apologies.😭

@vnbaaij
Copy link
Collaborator

vnbaaij commented Nov 13, 2023

No worries!! Hope you had a nice dinner. Thanks for making the initial changes. Getting it aligned to our naming is only a small change.

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.

3 participants