techvalidate / pano

MIT License
0 stars 0 forks source link

Questions on workflow for Pano #12

Closed tjdo closed 7 years ago

tjdo commented 7 years ago

So two things I have noticed with Pano:

  1. I've lost all my code hinting for anything in the Pano engine when working on CX. This is helpful for FE, since we're often typing CSS classes, icon names, etc. Having the code completion/hinting makes it much easier than having to find the files that contain those classes, icons, etc to find the name of the item we want to use.

  2. Anytime I make a change to anything in Pano, I need to restart Rails to see my changes in CX. For FE, this means a lot of restarts if we are adding in new custom, sharable elements like icons and CSS.

Are there any workarounds for these?

jonwolfe commented 7 years ago

TJ, code hinting is an IDE concern and I can't troubleshoot how to fix code hinting in your IDE. I don't use Intellij.

Re having to restart Rails after every change, Jordan has made some workflow suggestions. I think he might have documented those, but not sure.

On Fri, Apr 7, 2017 at 11:47 AM TJ Downes notifications@github.com wrote:

Assigned #12 https://github.com/techvalidate/pano/issues/12 to @jonwolfe https://github.com/jonwolfe.

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/techvalidate/pano/issues/12#event-1034601485, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAUFJCuK9SlVGO_zqIvpQZztLuzbI6Uks5rtoTUgaJpZM4M3QY1 .

mmlindeboom commented 7 years ago

@tjdo I've run into this. I'd suggest doing the bulk of your development on a "shared" feature in the host application its going to go in / the one you're currently coding in, then moving it into Pano. For the ReduxElement class and the helper, I did most of the work in CX, then transitioned it over to Pano.

jmckible commented 7 years ago

@mmlindeboom is on the money. @tjdo I highly suggest adding new functionality directly to CX. Then, create a PR to Pano. Once a new Pano release is minted, yet another PR can be done against CX to increment the Pano version and remove the duplicate code.

tjdo commented 7 years ago

@mmlindeboom this addresses item 2. Do you have any solution to item 1?

tjdo commented 7 years ago

Also, I'm not quite sure how we'd add, say, a new icon to the icon helper directly in CX and not in Pano. Can someone explain that part to me?

mmlindeboom commented 7 years ago

@tjdo Item 1 was also happening to me after I ran bundle config local.pano ~/path/to/pano. I did some googling and found that RubyMine (and by extension intellij's ruby plugin) doesn't know how to locate a gem file with a local path, and so it can't provide completions and lookups.

To solve it had to remove the local variable with bundle config --delete local.pano. Once RubyMine reindexes, I had code completion to Pano objects again.

This is an issue when trying to develop inside of Pano and looking to see changes in the host application because you need to run bundle config local.pano ~/path/to/pano (which of course causes you to lose completion again). Therefore this lends a lot of credence to @jmckible's suggested workflow

As for your second question, @tjdo , do you mean add an icon meant specifically for CX and not to be shared? I'm not sure exactly what you mean

tjdo commented 7 years ago

Thanks Matt, that makes more sense.

What I am referring to is making changes to something like icon_helper, for CX. Since the icon_helper resides in Pano, it seems to me we'd make the changes in Pano, not in CX, as was suggested. In fact, it seems that as we mature Pano, most of our changes would be made in Pano, therefore making a moot point of "adding new functionality directly to CX. Then, create a PR to Pano. Once a new Pano release is minted, yet another PR can be done against CX to increment the Pano version and remove the duplicate code."

jmckible commented 7 years ago

You make a good point about changes to the icon library. It's a lot of process to just add a new element to the MaterialIcons hash. A more verbose solution would be to allow loading of app specific data for methods like this.

mmlindeboom commented 7 years ago

@tjdo @jmckible I agree its more work, but I'd actually argue that its the nature of sharing code this way. You'd have to do something similar if we were sharing FE code with yarn packages rather than a rails engine. It might be a hassle to add one new icon to the map, but how often are we going to need to do that? I'm not sure it necessarily demands a fix. Alternatively, if its a feature that needs frequent maintenance and updates, in that case then we may want to reconsider whether it should be in Pano, in the first place.