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

Extraction of MatBlazor Documentation as a reusable component #872

Open
wants to merge 29 commits into
base: develop
Choose a base branch
from

Conversation

TFTomSun
Copy link

@TFTomSun TFTomSun commented Mar 25, 2021

1. Extraction of Documation App Frame to be reusable & Generate XML Documentation and Razor View at runtime
I really like the way how you created your documentation, and would like to reuse it for other blazor components. Therefore I extracted the documentation app frame from MatBlazor.Demo. I also made the xml doc and razor code view generator executable at runtime, so that anybody simply can write some docu components and provide the xml doc file of the documented component as a embedded resource. I kept everything backward compatible.
You can toggle between the old and the new documentation apporach by selecting the launch target with the _new postfix.
There you can see that only the class doc razor is required. Menus, xml docs, and razor code view are automatically provided at runtime.
Some things I made configurable: e.g. turn on / off ads. The defaults are always set in the way that your MatBlazor documentation doesn't change.
You can use the new and the old approach of documentation side by side, but to keep it clean, I remove now the runtime generated XmlDoc and RazorDoc support from the MatBlazor.Demo project. The MatBlazor.Doc.Demo only uses the runtime generation approach.

2. MatBlazorVirtualScroll component
I've added a Blazor Virtualize based control "MatBlazorVirtualScroll", on .netstandard2.1 it falls back to MatVirtualScroll. I did it because the MatVirtualScroll had issues in .NET 5 (items were not correctly displayed). I've added a doc page in the new MatBlazor.Doc.Demo. You could take it over to MatBlazor.Demo if you decide to keep the documentation as it is, instead of using the dynamically generated xml and razor doc view

3. Fix of MatVirtualScrollView
I fixed MatVirtualScroll, the properties of MatVirtualScrollView have to be of type double instead of int, however I would like to keep the MatBlazorVirtualScroll component, because Blazor Virtualize has more features (like lazy loading, placeholder, when item not loaded, etc.) that could be utilized. I'll add some examples for that.

@TFTomSun
Copy link
Author

MatBlazor + .NET 5 ❤
recording

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.

None yet

2 participants