Commit Graph

418 Commits

Author SHA1 Message Date
Carson Katri 525cefe6bc
Allow @Environment on all MountedViews (#146) 2020-07-02 09:36:16 -04:00
Max Desiatov 1632db77b9
Rename MountedView to MountedViews for consistency 2020-07-01 23:22:06 +01:00
Max Desiatov b0947ce71c
Remove unused files from TokamakCore 2020-07-01 23:17:35 +01:00
Max Desiatov 04ee6d9e30
Rename MountedComponents directory to MountedView 2020-07-01 23:15:39 +01:00
Jed Fox 17463c43ed
Add TextFieldStyle (#125)
* Add TextFieldStyle

* oops

* Comment out the Semantic UI CSS

* Move the DOM-specific stuff to TokamakDOM

* SecureFIeld is implemented!

* Remove commented-out code

Co-authored-by: Max Desiatov <max@desiatov.com>

* Remove unncessary underscore and proxy method

* Enable building on Xcode for access to IDE tools

* Add an environment variable for TextField style

* Remove mandatory init()

* Update Sources/TokamakCore/CGStubs.swift

Co-authored-by: Max Desiatov <max@desiatov.com>

* Update Sources/TokamakCore/CGStubs.swift

Co-authored-by: Max Desiatov <max@desiatov.com>

* Remove the lock

* Move file to sources folder

Co-authored-by: Max Desiatov <max@desiatov.com>
2020-07-01 14:43:09 -04:00
Max Desiatov 8b62cc67a2
Credit SwiftWebUI in a special way in README.md (#140) 2020-07-01 19:36:02 +01:00
Max Desiatov f85e26a350
Add "Modular structure" section to `README.md` (#137)
* Add "Modular structure" section to `README.md`

This clarifies the general structure of the `Tokamak` package and lays out "the underscore rules" to indicate "package private" access for symbols that aren't intended for public use.

* Refine wording in the "Modular structure" section
2020-07-01 14:41:24 +01:00
Max Desiatov 5adc7b2cff
Conditionally import SwiftUI in README.md example (#138)
This demonstrates portability of Tokamak a bit more in my opinion. Also, we had a redundant closing brace in the example code 🤦‍♂️
2020-07-01 14:40:50 +01:00
Carson Katri 1d71fe0c7d
Implement Environment (#135)
* Environment impl

* Fix line lengths

* Danger and review fixes

* rename _modifyEnvironment to modifyEnvironment
2020-07-01 08:28:09 -04:00
Max Desiatov b1b5693b66
Add logo to README.md (#133)
* Add logo to README.md

* Fix header logo layout in README.md

* Increase header logo width to 640px

* Add Jed Fox as a maintainer to README.md

* Update README.md

Co-authored-by: Jed Fox <git@twopointzero.us>
2020-07-01 08:28:32 +01:00
Max Desiatov 5f47cb485d
Refine formatting 2020-06-30 23:39:30 +01:00
Max Desiatov 5439933c45
Use proxy types for package private properties (#127)
I think that while public functions giving access to private properties does the job, they pollute the global namespace of `TokamakCore`, while for every property you need to create a separate function. These functions read a bit weird at their place of use, so I'm wondering whether the Proxy pattern could work better here. While it's more verbose, I find it a bit more readable, while also adding some sort of structure here for grouping multiple properties if needed.
2020-06-30 20:09:47 +01:00
Carson Katri f9f11a0113
Shape, Path, and some related modifiers (#119)
* Initial Shape support

* Border modifier

* Better demo

* Make Path conform to Shape

* Implement clipShape

* Add shapes/path/shapestyles to progress.md
2020-06-30 15:00:16 -04:00
Max Desiatov bc8196e9ef
Add `todo` to `disabled_rules` in .swiftlint.yml 2020-06-30 17:30:44 +01:00
Carson Katri 98a107f7fe
Add ScrollView (#128)
* Add ScrollView
* Root styles for ScrollView and Stack
2020-06-30 12:29:06 -04:00
Max Desiatov 0e910756c0
Allow refactor PR labels in label.yml 2020-06-30 16:01:14 +01:00
Max Desiatov 36aaf24878
Avoid running Danger on PRs from forked repos 2020-06-30 15:09:30 +01:00
Carson Katri e40a701752
Add Spacer support (#122)
1. If a Stack has a Spacer as a child, we need to fill the width or height of the parent so the Spacer's flex-grow: 1; works.
2. If a Stack has a child Stack along the cross axis (HStack with a nested VStack and vice vera) we need to fill the cross axis
3. If a Stack has a child Stack along the same axis (HStack with a nested HStack) we need to fill the axis.
2020-06-30 09:31:25 -04:00
Max Desiatov 9f5877e8ab
Update EmptyView status in progress.md 2020-06-30 14:23:39 +01:00
Max Desiatov 18fc89c4a1
Re-enable linting with Danger (#124)
Probably the reason for Danger failures was the bot account not having access to the project.
2020-06-30 13:39:56 +01:00
Max Desiatov 9793787e66
Check whether PRs have labels with GitHub Actions (#123)
To improve housekeeping, this workflow checks that all PRs have labels on them.
2020-06-30 13:38:53 +01:00
Max Desiatov 42d5ede20f
Link to the progress doc from README.md 2020-06-29 18:00:17 +01:00
Jed Fox b2b5ec2ae5
Add TextField, SecureField, and a progress document (#116)
I’ve added two TextFields to the demo, which are supposed to have their values synced. Pressing enter in the second one will increment the commit counter.
2020-06-29 17:52:22 +01:00
Carson Katri 4b3b377c82
Add layout modifiers (#118)
* frame and padding modifiers
2020-06-29 10:33:27 -04:00
Max Desiatov 9bed8e0cb8
Update DOM node properties and listeners on renderer update (#117)
* Update DOM properties and listeners on renderer update

* Fix listeners not passed in EmptyView init
2020-06-29 00:09:28 +01:00
Carson Katri b7d7b125b2
Add support for Text Modifiers (#114)
* Text styles and Environment setup for View font

* Text modifiers and demo

* Format Source files

* Fix font-size and add font-family when no Font is specified

* Add TextStyle

* PR fixes

* Format files

* Add note about Text modifiers
2020-06-28 18:05:53 -04:00
Max Desiatov ab2e907f9d
Update .swiftlint.yml 2020-06-28 22:51:59 +01:00
Max Desiatov 6c46e308d5
Update .swiftlint.yml 2020-06-28 22:50:09 +01:00
Max Desiatov e881e8afde
Remove unused TokamakHTML module 2020-06-28 22:48:12 +01:00
Max Desiatov 66d5045a1f
Remove `danger.yml` (hopefully temporarily) 2020-06-28 21:05:52 +01:00
Carson Katri f02a1d8022
Fix HStack to use flexbox instead being a blank div (#115) 2020-06-28 12:22:15 -04:00
Max Desiatov e74e4f34b6
Disable multiple_closures_with_trailing_closure rule 2020-06-28 16:19:31 +01:00
Max Desiatov 47234d15af
Mention `ZStack` in README.md as available 2020-06-28 16:15:35 +01:00
Max Desiatov 429bf3b58c
Increase counter limit in TokamakDemo/main.swift 2020-06-28 16:09:10 +01:00
Max Desiatov 79d66383f1
Another attempt to fix Danger GitHub token 2020-06-28 15:26:49 +01:00
Carson Katri 0aedd15f8a
ForEach (#113)
* Add ForEach and demo
* Add better demo for ForEach
* Fix formatting

Co-authored-by: Max Desiatov <max@desiatov.com>
2020-06-27 16:12:55 -04:00
Max Desiatov 521025cba9
Update maintainers list in README.md 2020-06-27 21:06:58 +01:00
Carson Katri e06a5b4308
Add ZStack and modifier support for setting zIndex (#112)
* Add ZStack and modifier support for setting zIndex

* Improve ViewModifier to support custom modifiers correctly

* ModifiedContent and PR fixes
2020-06-27 20:33:15 +01:00
Max Desiatov cf38796877
Allow the bot account to post Danger comments 2020-06-27 19:11:29 +01:00
Max Desiatov 033ea8d1b4
Expand the "Contributing" section in README.md 2020-06-27 17:19:43 +01:00
Max Desiatov 70d94d3960
Delete Reference.swiftinterface 2020-06-26 22:48:40 +01:00
Max Desiatov fcbf9f6d49
Clean up example code in README.md/main.swift 2020-06-23 12:14:43 +01:00
Max Desiatov b29aa57aa2
Remove TokamakTestRenderer product (for now) 2020-06-23 12:07:00 +01:00
Max Desiatov 735251fb13
Rename Tokamak module to TokamakCore 2020-06-23 11:47:54 +01:00
Max Desiatov c43eca0385
Remove `public` from example code in README.md 2020-06-23 11:43:05 +01:00
Max Desiatov 96ef5d123a
Add inline SVG and styles/scripts to example code 2020-06-23 11:41:59 +01:00
Max Desiatov 83730ca55a
Revert "Add separate TokamakHTML module"
This reverts commit 498f033a43.
2020-06-23 11:31:27 +01:00
Max Desiatov 498f033a43
Add separate TokamakHTML module 2020-06-22 23:01:11 +01:00
Max Desiatov c8f75e32af
Use Semantic UI CSS in TokamakDemo 2020-06-22 18:00:02 +01:00
Max Desiatov 523426657d
Remove default `Never` body, refine error messages
Resolve #110.
2020-06-22 10:18:47 +01:00