mirror of
https://github.com/Hopiu/bowser.git
synced 2026-03-16 19:10:24 +00:00
No description
Enhanced tab widget design: - Unified tab widget with integrated close button (no visual separation) - Close button on the right with rounded right corners - Tab button with rounded left corners for seamless integration - Custom CSS styling for professional appearance - Hover effects: close button highlights in warning color - Tab highlights as suggested-action when active Visual improvements: - Tabs have rounded corners (4px radius) - Proper borders matching theme colors - Better padding and spacing - Flat buttons by default except active tab - Close button marked with ✕ instead of × - Better visual feedback on hover UX improvements: - Tooltips on all buttons (tab URL, close tab, new tab) - Small square close button (32px) for easy clicking - Active tab uses blue suggested-action styling - Tabs show full URL on hover - New tab uses about:startpage instead of example.com CSS styling: - Theme-aware colors using @view_bg_color, @borders, @warning_color - Proper border-radius on tab and close button - Visual separation between tab and close button - Hover state for better feedback All tests passing (15/15) |
||
|---|---|---|
| .github/prompts | ||
| assets | ||
| src | ||
| tests | ||
| .gitignore | ||
| main.py | ||
| pyproject.toml | ||
| README.md | ||
| uv.lock | ||
Bowser — Educational Web Browser
A custom web browser built from scratch following the browser.engineering curriculum.
Status: Early scaffolding phase (M0)
Building
Prerequisites
- Python 3.11+
- GTK 4 development libraries (Debian:
libgtk-4-dev libgtk-4-1) - Skia-Python (
skia-python):pip install skia-python - PyGObject (
PyGObject):pip install PyGObject
Setup
uv sync
uv run bowser
Testing
Run the test suite:
# Install dev dependencies
uv sync --extra dev
# Run all tests
uv run pytest
# Run with verbose output
uv run pytest -v
# Run with coverage report
uv run pytest --cov=src --cov-report=html
# Run specific test file
uv run pytest tests/test_browser.py
Development
# Format code
uv run black src tests
# Lint code
uv run ruff check src tests
# Type check
uv run mypy src
Project Structure
bowser/
├── src/
│ ├── network/ # URL parsing, HTTP, cookies
│ ├── parser/ # HTML & CSS parsers
│ ├── layout/ # Block/inline/embedded layout
│ ├── render/ # Paint commands, fonts, compositing
│ ├── script/ # JavaScript integration
│ ├── browser/ # Tab/frame/chrome orchestration
│ └── accessibility/ # A11y tree and screen reader
├── assets/ # Stylesheets, images
├── tests/ # Unit tests
├── pyproject.toml # Dependencies & build config
└── main.py # Entry point
Development Milestones
- M0: Project scaffold ✅
- M1: Display "Hello World" in GTK window with manual URL fetch & paint
- M2: Render plain HTML with text wrapping
- M3: Parse and apply basic CSS
- M4: Clickable links and navigation
- M5: Form input and submission
- M6: JavaScript execution (embed QuickJS)
- M7: Event handling
- M8: Images and iframes
- M9: Animations and visual effects
- M10: Accessibility and keyboard navigation
References
- Web Browser Engineering — O'Reilly book
- Let's Build a Browser Engine — Matt Brubeck's Rust tutorial