vinistock / sail

Sail is a lightweight Rails engine that brings an admin panel for managing configuration settings on a live Rails app
Other
507 stars 32 forks source link

Add views generator #354

Closed vinistock closed 3 years ago

vinistock commented 3 years ago

Closes #340

Add views generator to copy the _setting partial to the main app. This allows apps to customize the cards as they desire.

@denny would this be enough for the customizations you had planned?

codecov[bot] commented 3 years ago

Codecov Report

Merging #354 (d030a78) into master (8fddab9) will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #354   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           62        62           
  Lines         1652      1652           
=========================================
  Hits          1652      1652           

Continue to review full report at Codecov.

Legend - Click here to learn more Ξ” = absolute <relative> (impact), ΓΈ = not affected, ? = missing data Powered by Codecov. Last update 8fddab9...d030a78. Read the comment docs.

denny commented 3 years ago

Hey! Sorry it's taken me so long to get back to you on this - and you were so fast to put this together from when I started talking about it! But just as I was appreciating that fact, my life got complicated even by 2020 (which doesn't quite seem to be over yet) standards πŸ™„

I've just pulled the branch, and it definitely looks like it would get me either all or most of the way to the stuff I wanted to do - thanks! I'll have a play around, but as a starting point the generator did put the template in the right place for a standard Rails app, and with a bit of coaxing everything kept on working when I moved it into a Rails engine (ShinyCMS has gone (almost) Full Plugin now, with it all held together by a core plugin instead of the main_app. Kind of. Some wrinkles to work out there.) πŸ˜ƒ

Anyway, I shifted the gem require, the template, and the config files into my core plugin engine, and it's still using the customised card template, so that's a great start compared to some of the other engines I've been wrestling with.

I am still having JavaScript woes, but that's not Sail's fault; I could actually rename ShinyCMS to JavaScript Woes with painful accuracy. In this case I think I'm missing out on some stuff from the <head> by using my layout template instead of yours, if memory serves (although it rarely does). I thought I'd started copying some of it over when I was looking at this before, but my branch got so stale this last month or two that I think Git threw some of it away in disgust when I merged today πŸ™‚

I'll have a play with the card template tonight/tomorrow and let you know how it goes. And thanks again for your swift response to my thinking aloud in your issues queue, sorry I couldn't follow it up at the time!

denny commented 3 years ago

I haven't had as much time to play with this as I had hoped, but enough to say you should definitely merge it πŸ˜ƒ Thanks again!