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

Under the hood information for contributors #878

Open
oscherler opened this issue Aug 15, 2012 · 19 comments
Open

Under the hood information for contributors #878

oscherler opened this issue Aug 15, 2012 · 19 comments

Comments

@oscherler
Copy link
Contributor

I’m thinking of writing a Markdown document with some randomly useful information for contributors, as I figure it out, e.g.

  • changing the log level;
  • switching to dev mode so OpenPhoto uses the unminified JavaScripts;
  • how to minify the theme JavaScripts;
  • how some JavaScript stuff is done, like click handlers and modal dialogues;
  • and so on.

Is there interest in something like this?

@jmathai
Copy link
Member

jmathai commented Aug 15, 2012

There is. Some of these are nice bullets but others are entire markdown pages (how the JS stuff is done).

If you wanted to start something inside /documentation we can move the content around to the final place. It'd be nice to at least have something to point contributors to in the meantime.

@pixelistik
Copy link
Contributor

This would be great. I would also appreciate some information about the plugin system. I figured out the basic stuff and could add that, but failed to work out advanced things like routing HTTP requests to a plugin.

@jmathai
Copy link
Member

jmathai commented Aug 24, 2012

@pixelistik We need to include documentation of the plugin and theme frameworks to the general documentation. I think we're close to finalizing it to a point where documentation makes sense. I refrained on committing to the interface for plugins in case it needed to change. There's still a few pieces we can leave undocumented but the items you mentioned are ready to be signed off on :).

@oscherler
Copy link
Contributor Author

I’ll try and start something this weekend. I think the best way with this kind of stuff is to start writing whatever you have to say (like what @pixelistik and I figured out already, even if we’re probably wrong about some stuff) without minding form and organisation too much at first. Then we have a “something” that we can improve/reorganise/tear apart, instead of a “nothing” to plan/organise/reflect upon, which is a harder task.

@jmathai
Copy link
Member

jmathai commented Aug 24, 2012

Shall we do this using Github's wiki? It might be easier to write and adapt into whatever the final form might be.

Not sure what type of access is needed to edit the wiki but I'm happy to provide it. Looks like anyone can create wiki pages. We can just include the links in this issue to keep track.

How's that sound?

@oscherler
Copy link
Contributor Author

Sounds great. Apparently, anyone can edit the wiki unless you check “Restrict edits to Collaborators only” in the settings.

@oscherler
Copy link
Contributor Author

I wrote something about logging and dev mode:

https://github.com/photo/frontend/wiki/Contributing:-Getting-Started

@jmathai
Copy link
Member

jmathai commented Aug 27, 2012

Great start, I started updating it and added a TOC.

@sushimustwrite
Copy link
Member

@oscherler Now that photo/documentation is a separate repository we have a lot more room to spread out in the docs department. Can you submit this document as a pull request over there? Probably the best place would be in the contribute folder under docs.

(And any additions are welcome!)

@hfiguiere
Copy link
Member

It still doesn't explain how to regenerate the assets. I delete the whole cache and still get the same JS code in prod.

@jmathai
Copy link
Member

jmathai commented Aug 18, 2014

@hfiguiere You mean CSS as reported in #1525, right?

@hfiguiere
Copy link
Member

No. I mean JS as changed in PR #1526

@jmathai
Copy link
Member

jmathai commented Aug 18, 2014

mode="dev" should pull in current JS/CSS. Are you seeing some other behavior with that?

@hfiguiere
Copy link
Member

but it is SLOW. Very SLOW. I'd expect it to actually regenerate every and switching back to "prod" to speed up using pregenerated stuff.

@hfiguiere
Copy link
Member

hint this my deployment server.

@jmathai
Copy link
Member

jmathai commented Aug 18, 2014

@hfiguiere The slowness is the CSS generation. When mode="dev" everything is generated in realtime. The JS is simply concatenated so that's fast. The CSS, however, is compiling LESS into CSS.

To regenerate and cache everything you can set mode="prod" and modify the mediaVersion attribute in /src/html/assets/themes/fabrizio1.0/config/settings.ini by adding a non alphanumeric value. The non alphanumeric value ensures that it won't conflict with anything mediaVersion might be set into the future. This generates static assets once for that mediaVersion value and reuses it until it's changed.

@hfiguiere
Copy link
Member

Nope. Not working. tbx.js didn't change. Cached .js still don't have the change.

@hfiguiere
Copy link
Member

And yes they got regenerated.

@jmathai
Copy link
Member

jmathai commented Aug 18, 2014

@hfiguiere Let's move this discussion over to #1528.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants