Add offline web app demo (#9542)#9543
Add offline web app demo (#9542)#9543yasmoradi merged 5 commits intobitfoundation:developfrom yasmoradi:release
Conversation
WalkthroughThe pull request introduces modifications to GitHub Actions workflow files for Admin and Todo Sample projects, along with updates to the README.md. The changes focus on enhancing deployment configurations, introducing Ahead-of-Time (AOT) compilation for Blazor WebAssembly, and adding new deployment variations for the Todo application. The README.md is updated to reflect these new deployment options and showcase the expanded capabilities of the bitplatform applications. Changes
Sequence DiagramsequenceDiagram
participant GHA as GitHub Actions
participant Boilerplate as Project Boilerplate
participant Build as Build Process
participant Deploy as Deployment Target
GHA->>Boilerplate: Create Project
Boilerplate-->>GHA: Project Created
GHA->>Build: Configure Build Parameters
alt AOT Compilation
Build->>Build: Apply AOT Compilation
end
Build->>Deploy: Publish Application
Deploy-->>GHA: Deployment Complete
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (3)
README.md (1)
51-54: Fix hyphenation in "Todo" and consider adding deployment details.
- For consistency, consider hyphenating "Todo" to "To-do" in the application names.
- Consider adding brief descriptions of the key features/benefits of each variation to help users choose the appropriate version.
Apply this diff to fix the hyphenation:
-7. [todo-aot.bitplatform.cc](https://todo-aot.bitplatform.cc): .NET 9 Todo demo app +7. [todo-aot.bitplatform.cc](https://todo-aot.bitplatform.cc): .NET 9 To-do demo app -8. [todo-small.bitplatform.cc](https://todo-small.bitplatform.cc): .NET 9 Todo demo app +8. [todo-small.bitplatform.cc](https://todo-small.bitplatform.cc): .NET 9 To-do demo app -9. [todo-offline.bitplatform.cc](https://todo-offline.bitplatform.cc): .NET 9 Todo demo app +9. [todo-offline.bitplatform.cc](https://todo-offline.bitplatform.cc): .NET 9 To-do demo app🧰 Tools
🪛 LanguageTool
[grammar] ~53-~53: It appears that a hyphen is missing in the noun “To-do” (= task) or did you mean the verb “to do”?
Context: ...ps://todo-small.bitplatform.cc): .NET 9 Todo demo app with smaller download footprin...(TO_DO_HYPHEN)
[grammar] ~54-~54: It appears that a hyphen is missing in the noun “To-do” (= task) or did you mean the verb “to do”?
Context: ...://todo-offline.bitplatform.cc): .NET 9 Todo demo app with ef-core & sqlite (Azure s...(TO_DO_HYPHEN)
.github/workflows/todo-sample.cd.yml (2)
171-217: Consider adding offline sync configuration.The offline database deployment looks good, but consider adding configuration for offline sync strategy (e.g., conflict resolution, sync intervals).
Would you like me to provide an example configuration for offline sync settings?
🧰 Tools
🪛 yamllint (1.35.1)
[error] 176-176: trailing spaces
(trailing-spaces)
[error] 179-179: trailing spaces
(trailing-spaces)
[error] 191-191: trailing spaces
(trailing-spaces)
[error] 193-193: trailing spaces
(trailing-spaces)
[error] 203-203: trailing spaces
(trailing-spaces)
[warning] 205-205: too many spaces after colon
(colons)
[error] 206-206: trailing spaces
(trailing-spaces)
[error] 209-209: trailing spaces
(trailing-spaces)
218-263: Fix YAML formatting issues.The job configuration has several formatting issues:
- Trailing spaces
- Inconsistent spacing after colons
Additionally, consider documenting the optimization techniques used for the smaller build footprint (e.g., tree shaking, compression).
🧰 Tools
🪛 yamllint (1.35.1)
[error] 223-223: trailing spaces
(trailing-spaces)
[error] 226-226: trailing spaces
(trailing-spaces)
[error] 238-238: trailing spaces
(trailing-spaces)
[error] 240-240: trailing spaces
(trailing-spaces)
[error] 250-250: trailing spaces
(trailing-spaces)
[warning] 252-252: too many spaces after colon
(colons)
[error] 253-253: trailing spaces
(trailing-spaces)
[error] 256-256: trailing spaces
(trailing-spaces)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
.github/workflows/admin-sample.cd.yml(1 hunks).github/workflows/todo-sample.cd.yml(2 hunks)README.md(1 hunks)
🧰 Additional context used
🪛 LanguageTool
README.md
[grammar] ~53-~53: It appears that a hyphen is missing in the noun “To-do” (= task) or did you mean the verb “to do”?
Context: ...ps://todo-small.bitplatform.cc): .NET 9 Todo demo app with smaller download footprin...
(TO_DO_HYPHEN)
[grammar] ~54-~54: It appears that a hyphen is missing in the noun “To-do” (= task) or did you mean the verb “to do”?
Context: ...://todo-offline.bitplatform.cc): .NET 9 Todo demo app with ef-core & sqlite (Azure s...
(TO_DO_HYPHEN)
🪛 yamllint (1.35.1)
.github/workflows/todo-sample.cd.yml
[error] 176-176: trailing spaces
(trailing-spaces)
[error] 179-179: trailing spaces
(trailing-spaces)
[error] 191-191: trailing spaces
(trailing-spaces)
[error] 193-193: trailing spaces
(trailing-spaces)
[error] 203-203: trailing spaces
(trailing-spaces)
[warning] 205-205: too many spaces after colon
(colons)
[error] 206-206: trailing spaces
(trailing-spaces)
[error] 209-209: trailing spaces
(trailing-spaces)
[error] 223-223: trailing spaces
(trailing-spaces)
[error] 226-226: trailing spaces
(trailing-spaces)
[error] 238-238: trailing spaces
(trailing-spaces)
[error] 240-240: trailing spaces
(trailing-spaces)
[error] 250-250: trailing spaces
(trailing-spaces)
[warning] 252-252: too many spaces after colon
(colons)
[error] 253-253: trailing spaces
(trailing-spaces)
[error] 256-256: trailing spaces
(trailing-spaces)
🔇 Additional comments (3)
README.md (1)
47-50: LGTM! Clear documentation of deployment configurations.
The deployment configurations are well documented with clear hosting details (Azure Web App + Cloudflare CDN).
.github/workflows/admin-sample.cd.yml (1)
189-189: Verify the impact of removing offline database support.
The removal of the --offlineDb option from the Windows build might affect users who rely on offline capabilities in the admin sample.
Run the following script to check for offline database dependencies:
✅ Verification successful
Offline database support is being moved to a separate deployment
Based on the verification results, the removal of --offlineDb from admin-sample.cd.yml is intentional and aligns with the repository's structure:
- The offline database functionality still exists in the boilerplate templates and core components (
Bit.Boilerplateand related files) - In todo-sample.cd.yml, offline database deployment has been moved to a separate workflow job
deploy_blazor_wasm_standalone_offlineDb - This change represents a deployment strategy shift rather than a removal of the feature itself
This change improves deployment flexibility by allowing offline database support to be managed independently, similar to how it's now handled in the todo sample.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for offline database usage in the admin sample
# Check for offline database related code
rg -l "IndexedDb|SQLite" "AdminPanel/src/"
# Check for offline database configuration
rg -l "offlineEnabled|UseOfflineDb" "AdminPanel/src/"
Length of output: 208
Script:
#!/bin/bash
# Let's first find the correct paths in the repository
fd -t d "AdminPanel"
# Search for offline database related terms in the entire repository
rg -l "IndexedDb|SQLite|offlineEnabled|UseOfflineDb"
# Search for offline database related configuration in workflow files
rg "offlineDb" .github/workflows/
Length of output: 1664
.github/workflows/todo-sample.cd.yml (1)
Line range hint 124-170: LGTM! Well-configured AOT compilation setup.
The AOT compilation job is properly configured with the necessary build parameters:
- Uses
-p:RunAOTCompilation=truefor AOT compilation - Disables multilingual support to reduce size
- Deploys to a dedicated static web app
closes #9542
Summary by CodeRabbit
New Features
Bug Fixes
--offlineDboption from the workflow.Documentation