Skip to content

Feature/issue 207 delete file fix#213

Open
Amoghhosamane wants to merge 6 commits intoanusii:devfrom
Amoghhosamane:feature/issue-207-delete-file-fix
Open

Feature/issue 207 delete file fix#213
Amoghhosamane wants to merge 6 commits intoanusii:devfrom
Amoghhosamane:feature/issue-207-delete-file-fix

Conversation

@Amoghhosamane
Copy link

This PR fixes the mismatch between SolidUI and the updated solidpod API for file deletion.

What issue does this PR address

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Changes

  • Updated deleteFile(fileUrl: ...) to deleteFile(...) in:
    • lib/src/utils/solid_file_operations_delete.dart
    • lib/src/widgets/solid_file_operations.dart
  • Excluded templates/ from static analysis in analysis_options.yaml.

How Has This Been Tested?

  • Verified the code changes manually.
  • Note: Local analysis might still show errors until the latest solidpod change is fully propagated to the environment.

anusii#23

Reworked the home page to include NAME and COMMENT fields that can be saved to and restored from the Solid Pod. The overview information is still included below the data entry fields. Closes anusii#23
This PR implements a Mason-based template for SolidUI applications. It includes:
- A new templates/solidui/brick directory with the template files.
- Replacing hardcoded values with Mason variables.
- A mason.yaml file to register the brick.
- A sync script support/sync_template_to_example.py to keep the example app in sync with the template.
- Updated README.md with instructions on how to use the template with Mason.
Closes anusii#104
Updated deleteFile() calls to use positional argument for fileUrl, matching the latest solidpod API. Also excluded templates from analysis to avoid false positives. Closes anusii#207
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR primarily addresses Issue #207 by updating SolidUI’s file deletion calls to match the updated solidpod API (removing the obsolete named parameter). It also introduces a Mason brick template for generating a SolidUI starter app and updates repo tooling/docs to support the template.

Changes:

  • Update deleteFile(fileUrl: ...) calls to deleteFile(...) to match the new solidpod signature.
  • Add a Mason brick under templates/solidui/brick plus a contributor sync script to keep example/ in sync.
  • Update documentation and static analysis configuration (including excluding templates/** from analysis).

Reviewed changes

Copilot reviewed 19 out of 23 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
lib/src/widgets/solid_file_operations.dart Updates delete call to new solidpod deleteFile signature.
lib/src/utils/solid_file_operations_delete.dart Updates delete call to new solidpod deleteFile signature.
analysis_options.yaml Excludes templates/** from analyzer runs.
README.md Documents Mason-based app creation and template syncing workflow.
mason.yaml Registers the local solidui brick for Mason usage.
support/sync_template_to_example.py Adds script to generate from Mason brick and copy output into example/.
templates/solidui/brick/brick.yaml Defines the Mason brick and its variables.
templates/solidui/brick/brick/pubspec.yaml Template app pubspec for generated projects.
templates/solidui/brick/brick/analysis_options.yaml Template app lint configuration.
templates/solidui/brick/brick/README.md Template app README.
templates/solidui/brick/brick/.gitignore Template app gitignore.
templates/solidui/brick/brick/lib/main.dart Template app entrypoint with desktop window setup.
templates/solidui/brick/brick/lib/app.dart Template root widget wiring SolidThemeApp + SolidLogin.
templates/solidui/brick/brick/lib/app_scaffold.dart Template scaffold demonstrating SolidScaffold configuration.
templates/solidui/brick/brick/lib/home.dart Template home screen content.
templates/solidui/brick/brick/lib/constants/app.dart Template constants using Mason variables.
templates/solidui/brick/brick/lib/utils/is_desktop.dart Template helper for desktop platform detection.
templates/solidui/brick/brick/lib/screens/sample_page.dart Template sample page demonstrating navigation behavior.
templates/solidui/brick/brick/lib/screens/all_pod_files_page.dart Template page for browsing POD root.
templates/solidui/brick/brick/assets/images/app_icon.png Adds template app icon asset.
templates/solidui/brick/brick/lib/home.dart.old Adds an “old” home file (currently appears corrupted/binary).
example/lib/home.dart.old Adds an “old” home file in example (currently appears corrupted/binary).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +30 to +44
# 3. Copy generated files back to example
# Generated files are usually lib/, assets/, pubspec.yaml, etc.
gen_content_dir = os.path.join(temp_gen_dir) # mason make -o temp_gen_dir puts files directly there

for item in os.listdir(gen_content_dir):
s = os.path.join(gen_content_dir, item)
d = os.path.join(example_dir, item)
if os.path.isdir(s):
if os.path.exists(d):
shutil.rmtree(d)
shutil.copytree(s, d)
print(f"Updated directory: {item}")
else:
shutil.copy2(s, d)
print(f"Updated file: {item}")
Copy link

Copilot AI Feb 19, 2026

Choose a reason for hiding this comment

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

This sync script copies the generated template files directly into example/, which will overwrite example/pubspec.yaml. The template pubspec currently depends on solidui from pub (solidui: ^...), while the repo example uses a path: .. dependency to test local changes. The script should preserve/patch the example's dependency setup (and any overrides) so running it doesn't break local development of the example app.

Copilot uses AI. Check for mistakes.
Comment on lines +178 to +181
3. Add the SolidUI brick:
```bash
mason add solidui --path templates/solidui/brick
```
Copy link

Copilot AI Feb 19, 2026

Choose a reason for hiding this comment

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

README instructions use mason add solidui --path templates/solidui/brick, which will only work if the user has this repo checked out and the template directory is present. For end users starting a new project, document a mason add command that pulls the brick from a git URL (or a published brick), or explicitly state they must clone/vendor the template directory first.

Suggested change
3. Add the SolidUI brick:
```bash
mason add solidui --path templates/solidui/brick
```
3. Add the SolidUI brick (choose one of the following):
- **Recommended (no local clone required):**
```bash
mason add solidui -g https://github.com/anusii/solidui --path templates/solidui/brick
```
- **Using a local checkout of this repository:**
Make sure you have cloned this repository and are running the command from its root directory:
```bash
mason add solidui --path templates/solidui/brick
```

Copilot uses AI. Check for mistakes.
README.md Outdated

To create a new Solid-based app using `solidui` named `myapp` and
published by `example.com` begin with:
To quickly create a new Solid-based app, we provide a [Mason](https://pub.dev/packages/mason) template.
Copy link

Copilot AI Feb 19, 2026

Choose a reason for hiding this comment

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

There is trailing whitespace at the end of this line, which can trip markdown linting rules (e.g., MD009) in CI. Remove the trailing space.

Suggested change
To quickly create a new Solid-based app, we provide a [Mason](https://pub.dev/packages/mason) template.
To quickly create a new Solid-based app, we provide a [Mason](https://pub.dev/packages/mason) template.

Copilot uses AI. Check for mistakes.
exclude:
- ignore/**
- ignore/
- templates/**
Copy link

Copilot AI Feb 19, 2026

Choose a reason for hiding this comment

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

Excluding templates/** from analysis means CI's flutter analyze will no longer catch regressions in the Mason brick source. Consider adding a separate CI step that generates the template (e.g., via mason make) into a temp directory and runs flutter analyze on the generated app (or otherwise validates the brick), so template breakages are still detected.

Suggested change
- templates/**

Copilot uses AI. Check for mistakes.
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.

2 participants