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

Update/seed 0.7.0 #44

Merged
merged 16 commits into from
May 4, 2020
Merged

Update/seed 0.7.0 #44

merged 16 commits into from
May 4, 2020

Conversation

akhilman
Copy link
Member

@akhilman akhilman commented Apr 29, 2020

Upgrading to current seed's master.
Fixes #43

@akhilman akhilman marked this pull request as draft April 29, 2020 20:09
Copy link
Member

@MartinKavik MartinKavik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!
Btw I didn't have a feel that C! is fighting with C while I was reading code.

crate/src/lib.rs Outdated Show resolved Hide resolved
crate/src/lib.rs Outdated Show resolved Hide resolved
crate/src/lib.rs Outdated Show resolved Hide resolved
crate/src/page/partial/content_control_panel.rs Outdated Show resolved Hide resolved
crate/src/page/partial/guide_list.rs Outdated Show resolved Hide resolved
@akhilman
Copy link
Member Author

There is a lot of “cognitive complexity” that Clippy complains about.
It looks like it will be more interesting than I expected.

@MartinKavik
Copy link
Member

I'm ok with some global Clippy allows in this project - Seed repo should be clean, but it's not so critical here. Try to resolve my previous comments if possible, but don't kill time with too much refactoring here.

@naufraghi naufraghi mentioned this pull request May 1, 2020
@akhilman
Copy link
Member Author

akhilman commented May 2, 2020

Are there any other changes in API that I forgot to apply?

  • Replace App::builder by App::start.
  • Use subscribe for routing.
  • Replace class! macro by C!.
  • Replace View by IntoNodes.
  • Use LocalStorage.
  • Use new Url API.

@akhilman
Copy link
Member Author

akhilman commented May 2, 2020

Clippy complains about cognitive_complexity for functions that simple but use macros.
Like these functions:

fn view_testimonial(testimonial: &Testimonial) -> Node<Msg> {

pub fn view(guide: &Guide, model: &Model, show_intro: bool) -> impl View<Msg> {

fn view_content(

I will disable cognitive_complexity check for now.

@akhilman
Copy link
Member Author

akhilman commented May 2, 2020

Perhaps we should export these things in prelude.

error: usage of wildcard import
 --> src/page/partial/guide_list.rs:8:24
  |
8 | use seed::{prelude::*, *};
  |                        ^ help: try: `C, FutureExt, IF, a, attrs, button, div, empty, hr, id, input, li, span, style, ul`
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_imports

@akhilman akhilman marked this pull request as ready for review May 2, 2020 16:53
@akhilman akhilman changed the title WIP: Update/seed 0.7.0 Update/seed 0.7.0 May 2, 2020
@akhilman akhilman requested a review from MartinKavik May 3, 2020 09:32
Copy link
Member

@MartinKavik MartinKavik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Please merge and check if I didn't break something - https://github.com/akhilman/seed-rs.org/pull/1, thanks!

Update/seed 0.7.0 2

Changes:
- Updated Rust and JS deps.
- Doesn't show warnings in webpack-dev-server overlay (to resolve unnecessary warning).
- Updated architecture according to Seed's example `pages` (removed `Route`, use struct `Urls`, etc.)
- Replaced url part `/seed/latest` with `seed/0.6.0` in all guides so the links won't be broken by new Seed release.
- Removed `optimize_wasm.js` script because `wasm-pack` calls `wasm-opt` automatically in recent versions.
- Removed `package.json` because we use `Yarn`.
- Get rid of the error caused by tests configured to be used only with NodeJS.
@akhilman akhilman requested a review from MartinKavik May 3, 2020 22:24
@MartinKavik MartinKavik merged commit 9250de5 into seed-rs:master May 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade for current seed master
2 participants