Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interactive Guides #65

Merged
merged 41 commits into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
8d55257
Create new getting started guide using kino live view native
BrooklinJazz Nov 1, 2023
8d2a9f4
Use live_view_native_assets URLs for assets instead of local files.
BrooklinJazz Nov 13, 2023
29ebe3f
Add navigation
BrooklinJazz Nov 15, 2023
0511b58
swiftui-views draft and small writing touch ups
BrooklinJazz Nov 27, 2023
bc83289
grammar check and review getting-started guide
BrooklinJazz Nov 28, 2023
a871ef3
grammar check and review create-a-swiftui-application
BrooklinJazz Nov 28, 2023
e5c2329
Automate converting livebook into exdoc friendly version
BrooklinJazz Nov 28, 2023
90e5830
convert details sections to h3s for ex_doc friendly guides
BrooklinJazz Nov 30, 2023
74cdc29
IOS -> iOS
BrooklinJazz Nov 30, 2023
40321f5
Improve wording in the getting started guide
BrooklinJazz Nov 30, 2023
1382b7e
fix details script
BrooklinJazz Nov 30, 2023
eabb642
Merge branch 'main' into interactive_guides
BrooklinJazz Dec 4, 2023
5f89877
modify getting started example
BrooklinJazz Dec 4, 2023
420d5ac
Provide additional explanation for the LiveViewNativeMacros error
BrooklinJazz Dec 4, 2023
4605cad
Add LiveViewNative VS Code extension recommendation
BrooklinJazz Dec 4, 2023
fcfcf49
XCode -> Xcode
BrooklinJazz Dec 4, 2023
03c301d
Fix description of the Xcode Interface option
BrooklinJazz Dec 4, 2023
e802f86
remove "Again" in getting started.
BrooklinJazz Dec 4, 2023
50826f1
Update ContentView example and corresponding images
BrooklinJazz Dec 4, 2023
68a7cf8
Update guides/notebooks/swiftui-views.livemd
BrooklinJazz Dec 5, 2023
1154896
Update guides/notebooks/swiftui-views.livemd
BrooklinJazz Dec 5, 2023
f4776ac
Update guides/notebooks/swiftui-views.livemd
BrooklinJazz Dec 5, 2023
5dfcf2d
DRAFT add controls and indicators with phx-change to event-bindings
BrooklinJazz Dec 7, 2023
356cdeb
getting started guide wording changes and config updates
BrooklinJazz Jan 2, 2024
53b8363
fix mix create_ex_doc_guides task and rename it to ex_doc_guides
BrooklinJazz Jan 2, 2024
52e3706
Add mermaid diagram support to our docs
BrooklinJazz Jan 2, 2024
1cd525f
create a swiftui application guide update for version 0.2
BrooklinJazz Jan 2, 2024
bf5ff4a
Add additional swiftui views and update the swift ui views guide for 0.2
BrooklinJazz Jan 2, 2024
26ef0f2
update example in create a swiftui app lesson to use format instead o…
BrooklinJazz Jan 2, 2024
f73ae4d
remove TODO comment in ex_doc_guides.ex
BrooklinJazz Jan 2, 2024
54e6793
trim content in event bindings and fill in draft examples
BrooklinJazz Jan 2, 2024
af81899
generate docs
BrooklinJazz Jan 2, 2024
8cda30e
formatting changes to swiftui views headings
BrooklinJazz Jan 2, 2024
112e3c3
change event-bindings to interactive swiftui views
BrooklinJazz Jan 2, 2024
eba4ed1
Add selection examples to interactive swiftui views material and chan…
BrooklinJazz Jan 3, 2024
b3cbccd
Rename swiftui views -> common swiftui views
BrooklinJazz Jan 3, 2024
c1a48b2
clean up old notebooks when running ex_doc_guides task
BrooklinJazz Jan 3, 2024
fc8409d
add enter your solution below text
BrooklinJazz Jan 4, 2024
6989b09
Update guides to use the 0.2.0-rc.1 kino_live_view_native version.
BrooklinJazz Jan 9, 2024
d5f9306
Improve ScrollView Examples
BrooklinJazz Jan 9, 2024
388e79d
Update guides/notebooks/common-swiftui-views.livemd
BrooklinJazz Jan 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

329 changes: 0 additions & 329 deletions guides/ex_doc_notebooks/event-bindings.md

This file was deleted.

62 changes: 48 additions & 14 deletions guides/ex_doc_notebooks/interactive-swiftui-views.md

Large diffs are not rendered by default.

40 changes: 0 additions & 40 deletions guides/ex_doc_notebooks/tic-tac-toe.md

This file was deleted.

Large diffs are not rendered by default.

11 changes: 8 additions & 3 deletions guides/notebooks/create-a-swiftui-application.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,16 @@
```elixir
Mix.install(
[
{:kino_live_view_native, github: "liveview-native/kino_live_view_native"}
{:kino_live_view_native, "0.2.0-rc.1"}
],
config: [
live_view_native: [plugins: [LiveViewNative.SwiftUI]],
live_view_native_style_sheet: [parsers: [swiftui: LiveViewNative.SwiftUI.RulesParser]]
live_view_native_style_sheet: [parsers: [swiftui: LiveViewNative.SwiftUI.RulesParser]],
phoenix_template: [
format_encoders: [
swiftui: Phoenix.HTML.Engine
]
]
]
)

Expand Down Expand Up @@ -249,7 +254,7 @@ defmodule MyApp.HomeLive do
use LiveViewNative.LiveView

@impl true
def render(%{format: :swiftui} = assigns) do
def render(%{platform_id: :swiftui} = assigns) do
~SWIFTUI"""
<Text>
Hello again from LiveView Native!
Expand Down
11 changes: 8 additions & 3 deletions guides/notebooks/getting-started.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,16 @@
```elixir
Mix.install(
[
{:kino_live_view_native, github: "liveview-native/kino_live_view_native"}
{:kino_live_view_native, "0.2.0-rc.1"}
],
config: [
live_view_native: [plugins: [LiveViewNative.SwiftUI]],
live_view_native_style_sheet: [parsers: [swiftui: LiveViewNative.SwiftUI.RulesParser]]
live_view_native_style_sheet: [parsers: [swiftui: LiveViewNative.SwiftUI.RulesParser]],
phoenix_template: [
format_encoders: [
swiftui: Phoenix.HTML.Engine
]
]
]
)

Expand Down Expand Up @@ -42,7 +47,7 @@ If you are not already running this guide in Livebook, click on the "Run in Live

Then, you can evaluate the following smart cell and visit http://localhost:4000 to ensure this Livebook works correctly.

<!-- livebook:{"attrs":"e30","chunks":[[0,109],[111,306],[419,45],[466,63]],"kind":"Elixir.KinoLiveViewNative","livebook_object":"smart_cell"} -->
<!-- livebook:{"attrs":"eyJhY3Rpb24iOiI6aW5kZXgiLCJjb2RlIjoiZGVmbW9kdWxlIFNlcnZlci5FeGFtcGxlTGl2ZSBkb1xuICB1c2UgUGhvZW5peC5MaXZlVmlld1xuICB1c2UgTGl2ZVZpZXdOYXRpdmUuTGl2ZVZpZXdcblxuICBAaW1wbCB0cnVlXG4gIGRlZiByZW5kZXIoJXtmb3JtYXQ6IDpzd2lmdHVpfSA9IGFzc2lnbnMpIGRvXG4gICAgflNXSUZUVUlcIlwiXCJcbiAgICA8VGV4dD5IZWxsbyBmcm9tIExpdmVWaWV3IE5hdGl2ZSE8L1RleHQ+XG4gICAgXCJcIlwiXG4gIGVuZFxuXG4gIGRlZiByZW5kZXIoYXNzaWducykgZG9cbiAgICB+SFwiXCJcIlxuICAgIDxwPkhlbGxvIGZyb20gTGl2ZVZpZXchPC9wPlxuICAgIFwiXCJcIlxuICBlbmRcbmVuZCIsInBhdGgiOiIvIn0","chunks":[[0,109],[111,306],[419,45],[466,63]],"kind":"Elixir.KinoLiveViewNative","livebook_object":"smart_cell"} -->

```elixir
require KinoLiveViewNative.Livebook
Expand Down
494 changes: 442 additions & 52 deletions guides/notebooks/interactive-swiftui-views.livemd

Large diffs are not rendered by default.

51 changes: 0 additions & 51 deletions guides/notebooks/tic-tac-toe.livemd

This file was deleted.

4 changes: 4 additions & 0 deletions lib/mix/tasks/ex_doc_guides.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ defmodule Mix.Tasks.ExDocGuides do
@moduledoc "Generates ex_doc friendly guides from Livebook notebooks"
use Mix.Task
def run(_args) do
# clean up old notebooks
File.rm_rf("guides/ex_doc_notebooks")
File.mkdir("guides/ex_doc_notebooks")

File.ls!("guides/notebooks") |> Enum.filter(fn file_name -> file_name =~ ".livemd" end)
|> Enum.each(fn file_name ->
ex_doc_friendly_content = make_ex_doc_friendly(File.read!("guides/notebooks/#{file_name}"), file_name)
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ defmodule LiveViewNative.MixProject do
"guides/common-features/handling-events.md",
"guides/ex_doc_notebooks/getting-started.md",
"guides/ex_doc_notebooks/create-a-swiftui-application.md",
"guides/ex_doc_notebooks/swiftui-views.md",
"guides/ex_doc_notebooks/common-swiftui-views.md",
"guides/ex_doc_notebooks/interactive-swiftui-views.md"
# "guides/ex_doc_notebooks/swiftui-styling.md"
# "guides/ex_doc_notebooks/navigation.md"
Expand Down
Loading