jacekschae / learn-re-frame-course-files

:cinema: Learn re-frame course files for building Cheffy app
https://www.learnreframe.com/
57 stars 43 forks source link

[13 - log-in] Putting input in a label limits input size even if :control is true #1

Closed zelark closed 5 years ago

zelark commented 5 years ago

Input is wrapped by Label:

        [:> Label {:html-for :email} "Email"
          [:> Input {:control true

results in following: screen shot 2019-03-03 at 15 58 20

I've checked it against 3 browsers (Chrom, Firefox, and Brave) and got the same result. So, I have no idea why it looks properly in the video (13-log-in). Probably, some magic. :)

If we don't wrap Input:

        [:> Label {:html-for :email} "Email"]
        [:> Input {:control true... ]

everything is rendering as expected. And I've found exactly the same markup when looked at https://app.learnreframe.com/log-in source code.

Also I checked the increments and they have this issue as well.

jacekschae commented 5 years ago

Could you please share your app function?

The one defined in core.cljs at line 36

zelark commented 5 years ago

Sure, here we go

(defn app []
  (let [active-nav @(rf/subscribe [::nav.subs/active-nav])]
    [:<>
     [:> Normalize]
     [:> ThemeProvider {:theme app.theme/cheffy-theme}
      [:> Grid {:fluid false}
       [:> Row
        [:> Col
         [nav.views/nav]
         [pages active-nav]]]]]]))
zelark commented 5 years ago

Also I've run this one https://github.com/jacekschae/learn-re-frame-course-files/blob/master/increments/14-form-group

and got the same result.

jacekschae commented 5 years ago

I had similar probelm before with the Normalize but this seems to be another issue.

They should have the same indentation.

[:> Label {:html-for :email} "Email"]
[:> Input {:control true... ]

When I do the change on my computer everything works well, despite the indentation. The only think that comes to my mind is that we might have different smooth-ui versions

and actually that explains everything ...

screenshot from smooth-ui repo

screen shot 2019-03-03 at 14 57 59

I belive you are running 9.0.2 and I have 9.0.1, and this is why I didn'y notice that before

Thanks again for pointing this out. Need to figure out what is the best way to correct this.

zelark commented 5 years ago

I haven't changed the version of smooth UI, so mine is 9.0.1. https://github.com/jacekschae/learn-re-frame-course-files/blob/master/cheffy/package.json

zelark commented 5 years ago

Sorry, you're right. Checked my yarn.lock, it's 9.0.2.

UPD: That's happened because only the major version is pinned.

jacekschae commented 5 years ago

I should probably lock this. Will keep this open unilt I re-upload new videos.

Thanks a ton!

jacekschae commented 5 years ago

Just to inform anyone who might end up here. Videos 13 and 14 now include information how to fix this.

jacekschae commented 5 years ago

Videos 13 and 14 have been re-recorded and include correct implementaion