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

The list of missing common Ev, At or Tag #505

Open
MartinKavik opened this issue Jul 20, 2020 · 5 comments
Open

The list of missing common Ev, At or Tag #505

MartinKavik opened this issue Jul 20, 2020 · 5 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed missing functionality Not quite a bug, but needs to be addressed

Comments

@MartinKavik MartinKavik added help wanted Extra attention is needed good first issue Good for newcomers missing functionality Not quite a bug, but needs to be addressed labels Jul 20, 2020
@MartinKavik MartinKavik added 0.8.0 and removed 0.8.0 labels Aug 24, 2020
@L0g4n
Copy link

L0g4n commented Sep 16, 2020

I think data-target attribute is missing. I only found At::Data.

@MartinKavik
Copy link
Member Author

I think data-target is a specific Bootstrap attribute that leverages data-* attributes (please correct me if I'm wrong).
Perhaps we can add a helper like At::data("xx", "yy") that generates data-xx="yy" in the future, but I don't think we should add specific data variants.

@L0g4n
Copy link

L0g4n commented Sep 16, 2020

I do not know about that, but other CSS frameworks are also using this attribute, e.g. Bulma: https://bulma.io/documentation/components/navbar/#basic-navbar
But now I see that the docs are strange. In the first example they are using data-target for the hamburger menu, then later they just omit that attribute.
Edit: I guess then it's not really required? 🤷

@tommket
Copy link

tommket commented Jan 13, 2021

I just checked to see if I could help somehow and this issue was tagged as a "good first issue".
I looked into

Invalid => "invalid", Show => "show",
and the Invalid event is already there.

And what about the At::Role ? Should I add all the ARIA roles https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles ?

I also noticed that if I run cargo test on seed, there is a lot of doctests that fail to even compile, even though they are no_run, but cargo tries to at least build them, so they don`t get forgotten when changes happen.

@MartinKavik
Copy link
Member Author

hi @tommket!

There is a bit older, but still very relevant issue about the new API design. See this comment in the issue to have an idea: #525 (comment). Notice especially attr::xx calls.

The idea is:

  1. The list of all attributes would be downloaded from a public source (MDN or W3C database or something similar; probably including ARIA roles like you suggested).
  2. Typed Rust items would be generated from the downloaded list.
  3. Everyone would be happy. We wouldn't need to write the list manually (the topic of this issue) and there wouldn't be weird functions like as_at_value in attrs!{ At::Disabled => disabled.as_at_value() }.

The same principle apply to typed CSS, events and tags.

However, to move forward, we need to finalize the design first. It's a tough task because everyone has a different opinion and it's pretty hard to design it properly (especially CSS), but it's basically the last big feature that blocks Seed stabilization, so the help would be VERY welcome. Write me on Discord if it's interesting for you, please.


I also noticed that if I run cargo test on seed, there is a lot of doctests that fail to even compile, even though they are no_run

Somewhere in the "backlog" there was a task to improve doc examples once the new Rust documentation behavior is released. It has been already released - see https://stackoverflow.com/questions/31582064/how-to-link-to-other-fns-structs-enums-traits-in-rustdoc/53504254#53504254 - so we can improve it now but it hasn't got the highest priority.
However cargo test doesn't play nice with WASM apps at the moment, tests have to be run through wasm-pack + wasm_bindgen. You can run cargo make verify in the project root to start the entire format/lint/test pipeline. Ask on #support or #devel channel if you want to know more about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed missing functionality Not quite a bug, but needs to be addressed
Projects
None yet
Development

No branches or pull requests

3 participants