liveview-native / liveview-native/liveview-native-core
LVN command - set_attribute, remove_attribute, & toggle_attribute
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 166
- Forks
- 14
- PR merge metrics
- No merged PRs in 30d
Description
JS:
[set_attribute & remove_attribute](https://github.com/phoenixframework/phoenix_live_view/blob/main/assets/js/phoenix_live_view/js.js#L293-L305)
[toggle_attribute](https://github.com/phoenixframework/phoenix_live_view/blob/main/assets/js/phoenix_live_view/js.js#L239-L255)
----
Data:
```elixir
# set_attribute
["set_attr", %{attr: ["aria-expanded", "true"]}]
# remove_attribute
["remove_attr", %{attr: "aria-expanded"}]
# toggle_attribute
["toggle_attr", %{attr: ["open", "true"]}]
```
---
Docs:
[set_attribute](https://hexdocs.pm/phoenix_live_view/Phoenix.LiveView.JS.html#set_attribute/1)
[remove_attribute](https://hexdocs.pm/phoenix_live_view/Phoenix.LiveView.JS.html#remove_attribute/1)
[toggle_attribute](https://hexdocs.pm/phoenix_live_view/Phoenix.LiveView.JS.html#toggle_attribute/1)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the referenced JavaScript implementations in assets/js/phoenix_live_view/js.js at lines 239-255 and 293-305, then read the linked Phoenix.LiveView.JS documentation. Trace how LVN commands are represented in this Rust core and support the shown set_attr, remove_attr, and toggle_attr data; done means their behavior matches the referenced commands.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elixir, javascript, rust
- Domain
- api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100