beeware / beeware/toga

Finalize migration to insert-based web deployment

Open
#3,822 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
5.4k
Forks
827
Avg merge
15h 39m
Merged PRs (30d)
40

Description

### Describe the bug

In #3666, support for new Briefcase static web deployment tooling was added. This new format is based on using "inserts" into the base template.

However, Toga retains the use of a `/static` folder to maintain backwards incompatibility.

In ~6 months from the date of this ticket, we can finalize this migration.

### Steps to reproduce

1. Deploy tutorial 0 as a web project (`briefcase run web`)
2. See error
```
Processing toga_web-0.5.3.dev88+g490ffb176.d20251015-py3-none-any.whl...
Found toga_web/deploy/inserts/index.html~head
toga_web/deploy/inserts/index.html~head: Adding head insert for index.html
toga_web-0.5.3.dev88+g490ffb176.d20251015-py3-none-any.whl: legacy '/static' CSS file toga_web/static/toga.css detected.
Static file handling has been deprecated; this file should be converted into an insert.
```

### Expected behavior

There should be no warning about static file handling.

### Screenshots

_No response_

### Environment

- Operating System: All
- Python version: All
- Software versions:
- Briefcase: 0.3.26
- Toga: 0.5.2

### Logs

```

```

### Additional context

To complete the migration, move the `static/toga.css` content in the `toga_web` folder to a `deploy/inserts/static/css/briefcase.css~css`.

You should then verify that a clean deployment successfully includes the same CSS content in `briefcase.css`.

Lastly, we should be able to remove all the references to `style_framework` in example, testbed and demo apps.

Contributor guide

Open the contributing guide

Research direction

Start with toga_web/static/toga.css and the deploy/inserts/static/css/briefcase.css~css target described in the issue. Run a clean tutorial 0 web deployment with `briefcase run web`, compare the generated briefcase.css with the existing CSS content, and check the example, testbed, and demo apps for remaining style_framework references.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system, web-dev
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.