Giter VIP home page Giter VIP logo

design-system-starter's Introduction

The Australian Government Design System has been decommissioned Visit our community page for more information

Australian Government Design System - Starter

Get started with full page templates using the Australian Government Design System.

Contents


Templates

Browse full page templates using the Australian Government Design System.

Development environment

Clone this repository to create a local development environment and start modifying the templates.


Get started

The starter pack uses npm (node package manager) to set up a local development environment and install the Design System components. The default package manager for Node is npm. When you download Node, npm comes pre-installed.

  1. Make sure you have npm and Node installed on your computer. You can follow the npm instructions if you are unsure.

  2. Download, clone, or fork this repository into a folder on your computer.

  3. In the command line go into this folder and run npm install. This will install dependencies necessary for the local development environment.

  4. You should now be ready to start your local server by running npm run watch. This will watch for changes on *.scss files, create new *.css files and refresh the browser.

Using Docker

Build the image:

$ docker build -t ds-starter .

Then run the image and map the volume. Note: $PWD is not supported in windows.

$ docker run --rm --volume="$PWD:/app" -p 3000:3000 -it ds-starter

⬆ back to top


How it works

In your directory you have a package.json file. This file points to dependencies to install when running npm install. When you run npm install you install all of the Design System components and additional packages related to the local development environment.

After npm install Pancake is ran, this checks that your dependencies work together and creates the docs/js/script.min.js and src/sass/_uikit.scss.

The src/sass/main.scss imports the generated _uikit.scss. You shouldn't touch the _uikit.scss file as it is generated, but feel free to change the main.scss file.

When the user runs npm run build or npm run watch we use node-sass to convert the src/sass/main.scss file into the docs/css/main.css file. Autoprefixer is ran after compilation to add vendor prefixes to the main.css file.

Refer to the package.json scripts for how this has been set up

This set up allows you to modify the variables in the Design System file from the main.scss file. You can add your own colour scheme, or change the typography and spacing. Tweaks to the components or additional ones should be added below the import of _uikit.scss. Changes to these files will be injected into your browser so you don’t even need to refresh thanks to Browser Sync.

The docs folder in the contains all the files required to publish a website. The index.html file references the main.css file and script.min.js assets to generate the page. We name the folder docs because github pages uses the docs folder to host static websites.

⬆ back to top


Prerequisites

  • Node.js 8 or higher, preferably the current LTS version.

NOTE: If you're developing on Windows, please ensure that your local npm configuration is using a shell that supports UNIX like folder pathing ( i.e a/unix/path rather than a\\windows\\path ).

⬆ back to top


Contributing

To contribute to the Australian Government Design System Starter Pack:

  1. Fork the project & clone it locally.
  2. Create a new branch for the work that is going to be completed.
  3. Complete the work and test it to the best of your abilities following the guidelines here.
  4. Once the work is completed, write a good commit message.
  5. Push your work to GitHub and create a new pull request.
  6. Respond to any code review feedback.

⬆ back to top


License

Copyright (c) Commonwealth of Australia. With the exception of the Commonwealth Coat of Arms and where otherwise noted, this work is licensed under the MIT license.

⬆ back to top

};

design-system-starter's People

Contributors

adamxweb avatar aloktakshak avatar dependabot-support avatar dependabot[bot] avatar dominikwilkowski avatar gordongrace avatar kirihoy avatar mrrossmullen avatar pattyde avatar sukhrajghuman avatar

Stargazers

 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  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  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

design-system-starter's Issues

auto prefixer not running correctly?

When using the select component on local host the default dropdown icon does not get removed. This is probably an issue with our scripts/autoprefixer.

Use cards

  1. npm i @gov.au/card

  2. Remove this hideous thing
    image

  3. Use something like this instead:

image

Updates to Form page

Following a11y discussion

  • Make form hint same size
  • Make form hint same colour
  • Remove underline from form hint
  • The "R" in "Required" should be lower case

Setup CI / CD

We should be automating the build process to test if we're pushing broken changes.

Search results template

Search/results pages are common in government websites. Would be good if we could create a template that focuses good UX

Add Dockerfile

Lets Docker-ise!

Should probably do the same for ds-website repo...and others

style guide

is that any way I could see how the styleguild(docs/index.html) be generated?

Broken links in README.md

In the root README.md file all the links under the Templates and Development environment headings are broken. They are trying to link to a github pages site that does not exist.

Build issues on Windows environments

Error generated on fresh Windows 10 environment after NodeJS install and running through build instructions for uikit-starter:

C:\Users\USER\Documents\Code\uikit-starter\node_modules\uws>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild ) 
gyp ERR! configure error 
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack     at PythonFinder.failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:483:19)
gyp ERR! stack     at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:508:16)
gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Windows_NT 10.0.16299
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\USER\Documents\Code\uikit-starter\node_modules\uws
gyp ERR! node -v v8.11.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok

Running npm install sass manually before re-running npm install for ui-kit-starter appeared to solve the issue

Update main nav and footer markup

Remove word navigation from the aria-label in the <nav> element in footer and main nav according to version 3.0.4 and 1.0.6 respectively

css not loaded due to mime type strict enforcing + css classes

Chrome among others fails to import the css as no type is defined.

should have type="text/css" included.

Otherwise it comes up with
https://stackoverflow.com/questions/48248832/stylesheet-not-loaded-because-of-mime-type

Could of done a pull, but not worth it - I'll be playing with this soon enough :)

  • Actually the whole index.html looks like it needs updating as it still referrences uikit- CSS classes, when the UI2KIT is now au- (correct me if I'm wrong)..

Create a uikit-starter for a react/jquery project

Currently there are a few confusing and different implementations of the Uikit dependent on what code you are using.

Having a starter for all of the implementations will allow people to quickly understand how to set up their index.html, files and folders dependent on the implementation they are using.

Update validation on form page

HTML5 validation is not accessible and isn't well supported in older browsers.

Some ideas from a11y catchup

  • on submit, if there are validation errors, error labels appear between <input> and <label> for that input
  • page-alert appears, focus is shifted to this page-alert, which contains a list of errors on the form.
  • the page alert contains a list of form inputs that are invalid, with links to each of these

Refactor `main .au-body` styles as it causes issues with components that use `.au-body` inside main

When users add a body around the page alerts that are inside the main it causes some odd problems. We should refactor the code so that it only targets the first child main > .au-body or we give that element a new class and give the margin to it so it can not cause any problems with the uikit.

<body class="au-grid">
  <main>
    <section class="au-body">
      <div class="container-fluid">
       <div class="row">
        <div class="col-sm-12" id="content">
          <div role="alert" class="au-body au-body--dark au-page-alerts au-page-alerts--dark au-page-alerts--info au-page-alerts--dark">
           <h3>Important</h3>
           <p>Alert Content</p>
          </div>
        </div>
        </div>
      </div>
    </section>
  </main>
</body>

https://github.com/govau/uikit-starter/blob/4295f2df91440fb7601e01e9b5340d201bef78b3/src/sass/main.scss#L26-L34

Some description of solutions here:
https://community.digital.gov.au/t/css-conflicts-between-in-page-components/1076/9

no more update?

from the docs says npm install? install what? is this a no more update?

Windows 10 has a broken browsersync URL and onchange doesn't fire

The URL for browsersync doesn't work with windows as it adds single quotes to the URL.
The watch functionality is also broken in windows due to this.

http://localhost:3000/'docs'

Looking at the documentation for onchange it says:

NOTE: Windows users may need to use double quotes rather than single quotes. If used in an npm script, remember to escape the double quotes.

Found out that non existent folders causes an issue with onchange in windows: #Qard/onchange#50

A PR for this issue can be found here #1

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.