Loomio

Restructure UI code.

JH Jonne Haß Public Seen by 45

I think we don't need to vote if we should do it, so this discussion is about how doing it. To make things easier we should keep the current design where possible for now and do design improvements when this is done. I'll list some possible requirements/alternatives to what we currently use/tasks:

HTML/Templates

  • Get rid of unused templates
  • Get rid of app/views/shared/ if still in use move them to better fitting places
  • Make clear rules on what to render on the server and what to render on the client side, get rid of handlebars and server side templates doing the same job.
  • Refactor the code to get rid of "styling HTML", like 99% of <br>s, potential <b> tags and whatever
  • Use semantically rich tags, like using <em> for something important, not because it looks cool.
  • Decide on either ERB or HAML, don't use both.
  • Use all the (semantic) power HTML5 provides.
  • Stop using casing as design element, that just localizes terribly as there are scripts which have no casing.

CSS

  • Make Layout responsive
  • Get rid of fixed sizes where possible (I'm looking at you, px)
  • Develop a clear and clean structure. Like for example one CSS file for each GET route + meaningful common usages Group the common usages by categories, i.e. forms.
  • Port every SASS code to SCSS, see #3796 [DONE]
  • Get rid of all :css/`` blocks in templates
  • Port everything from Blueprint to Bootstrap, see#4466

JS

  • Get rid of multiple libraries essentially doing the same where possible, i.e. the autocomplete ones.
  • Move everything to Backbone if possible.
  • Replace hacked libs with vanilla ones doing it right in the first place. If not found try to externalize the hack into another file. If not possible make it damn clear inside the library where the change it and why it was done with big fat comments, to ease the life of the updater.
  • Update all dependencies, replace them with gems if available (maybe even create some?)

While at the frontend code, the locale files too contain many unused keys and semi duplicates. A lot of the template code was moved around so I guess about the half of the keys is accessed using the full path, unable to take advantage of the dot syntax. Maybe we should develop a struture there that's independent from the template structure?

I'll keep this list updated with the ongoing discussion, so ensure you'll rescan it once in a while ;)

ST

Sean Tilley Tue 9 Oct 2012 4:03PM

Good thinking. While I think a new look and layout would be great in the future, we'd need to address what you've listed first.

Regarding being responsive: while I think it's definitely something we want, we ought to think about how we want to tackle it. The way I see it, we could first just make everything responsive on the grid first, and see how the following things might also be useful.

  • Responsive toolkit: I think Bootstrap does an okay job with this, but Zurb Foundation might be worth looking into, due to some of the interesting grid work their toolkit uses.

  • Actual responsive layout: simply scaling up and down a desktop layout can end up with an ugly design, but designing for mobile first and scaling it up to different form factors can actually be pretty efficient. Not to mention, it might not be bad to think about making a responsive clone of the existing mobile site and using one standard frontend.

  • Getting rid of Blueprint/unnecessary extra layout frameworks and relying on a simpler way to put the page together.

Just some thoughts. :)

ST

Sean Tilley Wed 14 Nov 2012 1:26AM

I kind of feel like this wouldn't be a bad thing to push for in 0.0.3.0 or 0.0.4.0. A lot of the CSS and template fixes shouldn't be too hard to do, and if someone would be willing to take care of the JS half of it, we could actually make quite an improvement!

FS

Florian Staudacher Wed 14 Nov 2012 10:07AM

I could dig into the JS part, but I won't have much time for that before mid-December or so...

DM

David McMullin Sun 18 Nov 2012 8:46PM

I'm happy to dig around any JS as well, I learned a fair bit about backbone while I was converting the tagFollowings (PR pending =) ) and my JS skills are way better than my Ruby skills anyway =)

ST

Sean Tilley Mon 19 Nov 2012 4:24AM

David, we could definitely use help on the JS end of things! :)

FS

Poll Created Fri 30 Nov 2012 10:29AM

Use .scss for all our stylesheets Closed Mon 10 Dec 2012 11:29PM

I think as web developers we can agree, that plain CSS is just not enough in some situations - no argument there - and since we have the Rails asset pipeline, Sass comes with it for free.
But until now we had a mixture of both the older 'sass' files and the newer 'scss' ones.

I propose we discontinue 'sass' and switch to 'scss' completely.

FYI, the project website has this to say, which pretty much contains all the arguments for and against either:

> Sass has two syntaxes. The most commonly used syntax is known as “SCSS” (for “Sassy CSS”), and is a superset of CSS3’s syntax. This means that every valid CSS3 stylesheet is valid SCSS as well. SCSS files use the extension .scss.
>
> The second, older syntax is known as the indented syntax (or just “.sass”). Inspired by Haml’s terseness, it’s intended for people who prefer conciseness over similarity to CSS. Instead of brackets and semicolons, it uses the indentation of lines to specify blocks. Files in the indented syntax use the extension .sass.

Results

Results Option % of points Voters
Agree 91.7% 11 ST FS TS JH F G T PP F DU DM
Abstain 8.3% 1 JR
Disagree 0.0% 0  
Block 0.0% 0  
Undecided 0% 43 MS AA S CB HF BO DM GC JH M EG G AX PP BB DY SH RF DM DS

12 of 55 people have participated (21%)

FS

Florian Staudacher
Agree
Fri 30 Nov 2012 10:33AM

familiarity with css makes it easy to write scss, so better for new devs. also, I personally don't like the haml syntax ;)

JR

Jason Robinson
Abstain
Fri 30 Nov 2012 11:59AM

Trust you guys on this :)

ST

Sean Tilley
Agree
Fri 30 Nov 2012 3:33PM

Let's do it. :)

PP

Petar Petrović
Agree
Fri 30 Nov 2012 4:51PM

I'm all for this.

Load More