-
Notifications
You must be signed in to change notification settings - Fork 4
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
Refactor tenant-specific content #210
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
80eb536
to
a444939
Compare
e.g.: * tenant-content\OtherOrg\index.html (info about the tenant) * tenant-content\OtherOrg\news.html (posted news) * tenant-content\OtherOrg\rule-of-game.html (tenant rule of game) * tenant-content\OtherOrg\Files\ (future uploaed tenant content files)
a444939
to
cbda70e
Compare
668ea8b
to
802ee63
Compare
* Created a tenant content folder `/wwwroot/tenants-content` * HTML content is file <topic>.html * Metadata is in file <topic>.json * Created new home.html, home.json, news.html, news.json, rule-of-game.html, and rule-of-game.json files with metadata and placeholder content. * Added a new home.cshtml view to render tenant content. * Simplified footer in _Layout.cshtml by removing tenant-specific logic for the "Contact" link. * Updated `WebAppStartup` to use scoped `MainNavigationNodeBuilder` and singleton `TenantContentProvider` * Updated WebAppStartup.cs to use `MainNavigationNodeBuilder` instead of `CustomMainNavigationNodeBuilder ` * Deleted `CustomMainNavigationNodeBuilder` class and related usings. * Added class `ITenantContentProvider` to handel tenant content * Added a new `ContentItem` class in ContentItem.cs to represent a content item for a tenant. * Introduced a new interface `ITenantContentProvider` * Implemented `ITenantContentProvider` interface in `TenantContentProvider` * Added new methods in `MainNavigationNodeBuilder` to create tenant-specific navigation nodes. * Updated `TenantContent` controller to use `ITenantContentProvider` and added a new Home action. * Updated `IMainNavigationNodeBuilder` interface to make GetNavigationNodes method asynchronous. * Updated `MainNavigation` component and `MainNavigationComponentModelExtensions` to use asynchronous methods. * Updated Default.cshtml and NavigationNodeChildDropdownPartial.cshtml to use asynchronous methods for CSS class generation. * Updated .gitignore to include tenants-content directory
802ee63
to
bf68051
Compare
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Refactor tenant content handling and navigation
1. Move tenant content from razor views to pure html in wwwroot folder
e.g.:
pages
folder for League.Demo in the repository2. Created a tenant content folder
/wwwroot/pages
WebAppStartup
to use scopedMainNavigationNodeBuilder
and singletonTenantContentProvider
3. Integration
MainNavigationNodeBuilder
instead ofCustomMainNavigationNodeBuilder
CustomMainNavigationNodeBuilder
class and related usings.ITenantContentProvider
to handle tenant contentContentItem
class in ContentItem.cs to represent a content item for a tenant.ITenantContentProvider
ITenantContentProvider
interface inTenantContentProvider
MainNavigationNodeBuilder
to create tenant-specific navigation nodes.TenantContent
controller to useITenantContentProvider
and added a new Home action.4. Migrate to
async
IMainNavigationNodeBuilder
interface to make GetNavigationNodes method asynchronous.MainNavigation
component andMainNavigationComponentModelExtensions
to use asynchronous methods.5. Miscallaneous
Axuno.Tools.FileSystem.DelayedFileSystemWatcher
when processing directory changes