Coder Social home page Coder Social logo

moneyadviceservice / frontend Goto Github PK

View Code? Open in Web Editor NEW
16.0 16.0 7.0 53.63 MB

Money Advice Service's legacy tools

Home Page: https://www.moneyhelper.org.uk

License: MIT License

Ruby 59.10% JavaScript 7.34% HTML 21.21% CoffeeScript 0.52% Shell 0.09% API Blueprint 0.42% Gherkin 1.27% SCSS 10.05% Procfile 0.01%

frontend's People

Contributors

aduggin avatar alexwllms avatar andreferreiradlw avatar andrewgarner avatar andrewvos avatar benbarnett avatar benlovell avatar darokel avatar davidtrussler avatar dougdroper avatar gotbadger avatar guntrisoft avatar jiggypete avatar johnplayer1982 avatar jongilbraith avatar jonnywyatt avatar kiggundu avatar lshepstone avatar malcolmbaig avatar margonline avatar mconnell avatar nmiddleweek avatar ourmaninamsterdam avatar paulanthonywilson avatar scruti avatar stevenwilkin avatar stevoland avatar thenapking avatar tomas-stefano avatar tr4pst3r avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

frontend's Issues

MAS Collapsible module - Spacebar opens and immediately closes menu

@andrewtennison
In mas_collapsible.js, there's a keypress event for the spacebar which triggers a 'click' event on the trigger element. This causes the menu to open and then close immediately.

Commenting out this block fixes this issue...

// Accessibility support for spacebar
this.sections[i].trigger.on('keypress', function(e){
  if(e.which === 32) {
    _this.sections[i].trigger.trigger('click');
  }
});

I've tested it in IE9/10/11, Safari, Firefox and Chrome and both spacebar and enter keypresses toggle the menu as expected.

Happy to do a pull request, just wanted to check the reasoning behind it in case I've missed something.

Webengage dialogue accessibility issues.

We've had a report back from the DAC on the Savings Calculator. They included the following section regarding the feedback form, which I include below:

screenshot 2014-11-13 16 30 51

The icon to close the questionnaire is very small. This means that someone with mobility issues would not be able to select it due to the very small actionable area.

Happy to make the changes if anyone can point me to the right area. Equally happy for someone else to do it 😜

Intermittent test failures on Go

Karma is causing intermittent failures on Go:

./node_modules/karma/bin/karma start /var/lib/go-agent/pipelines/responsive_commit/frontend/tmp/karma_unit.js20141212-9196-dzbxll --single-run

module.js:340
    throw err;
          ^
Error: Cannot find module './lib/parse-js'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/var/lib/go-agent/pipelines/responsive_commit/frontend/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/uglify-js.js:14:17)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)

scss refactor

IE issues + possible refactor
child selectors
fontSize mixin
inlineBlock mixin
focus state for IE

Unused classes

We have turned off unused classes in the HTML inspector - however we would prefer to ignore certain pattern matches (such as js- wf- etc.).

font optimisation

Options:

  1. through css (do nothing)
  2. as base 64 encoded string in css
  3. 64bit string local storage
  4. google font loader
    • https://github.com/typekit/webfontloader
    • additional JS = 6.57k
    • async, means always get flash
    • inline, blocks first time
      could we extend to load async, set cookie, if cookie set / file cached add class / change loading method?
  5. custom JS solution
    • smaller than type kit as less services supported and unused features not in

I have implemented 4 inline but we should review this at a later stage

MAS/Dough/Yeast theme variable refactor

Problem
Currently Dough contains a number of MAS-specific styles which cannot be overridden directly/easily using the dough_theme layer in frontend.

Solution
I've started a refactor to tidy up the theming layer across frontend and Dough by removing any MAS-related theming and setting up a simple base for Dough. The dough_theme is moved from frontend into its own repo: mas_dough_theme. This allows for the theme to be overridden at an app and engine level.

Frontend now relies on three different dependencies:

  1. Dough - provides base CSS styling for Dough components.
  2. Yeast - provides grid, mixins, placeholders and functions support for mas_dough_theme and other MAS site components.
  3. mas_dough_theme - overrides the default Dough theme with MAS styling.

Progress
The majority of the work is done, the last remaining part is to implement mas_dough_theme @imports across the engines and do some regression testing. @Guntrisoft suggested diffing the generated CSS to check for any abnormalities.

Here's a little CLI command that will diff served files (The left-hand CSS is master and right-hand CSS is the new changes):

sdiff <(curl -s http://localhost:3001/assets/enhanced_responsive.css\?body\=1) <(curl -s http://localhost:5000/assets/enhanced_responsive.css\?body\=1) |grep "<" > diffs.txt 

PRs

An example of the new changes implemented in an engine:

  • moneyadviceservice/pensions_calculator#172

@moneyadviceservice/frontend

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.