Coder Social home page Coder Social logo

hedwig's Introduction

⚠️ DEPRECATED

The new Hedwig Design System is now stable and can be found here. This repository will be minimally maintained.

Hedwig - Posten and Bring Design System.

GitHub release GitHub issues

tl;dr

npm install
npm run dev

Documentation

Hedwig documentation

Disclaimers

We will not support changes and updates on older major releases of Hedwig. Users of the Hedwig repo are responsible for

  • Staying up to date on changes made - in code and guidelines.
  • Following the guidelines, which also include best practices and correct brand implementation.

Contributing

This repo is public, so please consider this when contributing

Found a bug?

  • Create a new issue.
  • If you want to fix this issue yourself, do so and then follow the development giuidelines below.

Need to change or add something new?

First of all: let the community know on the internal #hedwig slack channel what you need and how you plan to solve it. There might be other teams that also would benefit from your solution. Either way there will probably be one of two outcomes:

1: Adding something new

If you are adding new functionality to Hediwg please follow the below development giuidelines below.

2: Just do it locally

If the thing you're changing or adding is specific to your project, and not all sites using Hedwig, use a separate css file to add or override functionality using your own classes and components.

Development guidelines

  • It is recommended to always develop the components within the documentation. The docs will live reload.
  • All components should do one thing, and do that thing well.
  • All CSS should be written to adhere to the BEM methology.
  • All JS should be classless and use data-attributes to attach functionality.
  • New functionality should be reviewed by at least one other person before going into Hedwig.

To add a new feature:

  • Create a new feature branch (git checkout -b branchname)
  • Develop the new feature (Template css and js files can be found in the /templates folder)
  • Document and test the new feature
  • Create a pull request and ask for a review

To modify an existing feature follow the same process, but also remember the versioning system. If there is a breaking change, or if this might impact existing sites using hedwig, update the version number. See below for details.

Running Hedwig locally

clone this repo
npm install                 # to install dependencies
npm run dev                 # start local development server

Open http://localhost:3000 🚀

Tip: In order to test changes on a locally running application which uses hedwig, replace the dependencies with the following dev server URLs (after running hedwig locally):

http://localhost:3001/posten.css
http://localhost:3001/main.js   

Staging

The staging environment is setup in Heroku as a separate app. All the assets are copied to docs folder and referred from there in this branch.

Pushing a new change will automatically deploy the app in Heroku.

setup_staging task need to be run whenever the staging branch is reset. It copies the scripts/Procfile to the root folder. Commit and push the file in staging branch only.

master branch shouldn't have a Procfile.

Versioning

Hedwig uses semantic versioning to make sure once a site starts using it, the CSS file won't suddenly change and break the site. The version number is located in package.json, and will be appended to the .css and .js files. Example - bring-1.0.3.css.

When a breaking change is added, a new major version is required.

Hosting

Production CSS, JavaScript and assets are served through a CDN using jsDelivr.

Icons

Functional icons

We use FontAwesome for functional icons. Not all FontAweseome icons are available in Hedwig You will find available icons here. If you need to use an icon from FontAwesome that is not allready added in Hedwig you need to add it and open a pull request.

Font Awesome Icons works like this

  • You need to add an environment variable with your authToken from Font Awesome. For Posten and Bring developers, contact Hedwig contributors. Otherwise, you can get a licence.
  • Use functional icons like described in the docs

To add the authToken to your environment, in ~/.bashrc add the following line:

export NPM_TOKEN=[authToken]

The token needs to be replaced by a real token.

Service icons

Hedwig use SVG sprite for special icons and logos. These icons must only be used in conjunction with its service or service name.

SVG Sprite Icons works like this:

  • Place icons in the assets/icons/ folder
  • Run npm run svg to generate SVG sprite. npm run build or npm run dev will both also produce the SVG sprite

We use inline SVG's for icons.

Linting

Linting our project is import to keep a holistic code base. It is recommended to use a linting plugin for your editor while developing.

JavaScript uses ESLint with the Airbnb config.

CSS uses Stylelint with the standard config.

Build scripts

The /scripts folder contains a set of custom scripts that helps compile the docs.

List of npm scripts:

  • dev: Starts the watcher and starts the node server (in development mode)

FAQ

Q: I have a question! Who do i ask? A: Use the Hedwig slack channel!

Maintainers

The Hedwig Team is resposible for maintaining the Hedwig repo. Contact us with any questions or feedback either in the #hedwig Slack channel or [email protected]

Dependencies

development helpers:

included in bundle:

⚖️ Licenses

hedwig's People

Contributors

akshat0712 avatar akshat1993 avatar amitjagtap4 avatar arunvisvajeetrs avatar ashutosh2308 avatar bnhovde avatar charan42 avatar dagtornes avatar dependabot-preview[bot] avatar dependabot[bot] avatar dreamyguy avatar elisabethirgens avatar gayathripalani avatar haraldbo avatar haraldvinje avatar helenekassandra avatar hellehi avatar henrikhermansen avatar juliuxu avatar laugerud avatar leifriksheim avatar monikamangal avatar nidde-posten avatar petter-w avatar shubhamg15 avatar simengjermundsen avatar thaletan avatar tlindstrom avatar viggo avatar zhewan 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

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

hedwig's Issues

Logo

We need the correct ones .. :)

You find them in dropbox

Look into making this a public repo

Can Hedwig be developed in a public repo? Yes! We think that would be awesome. Some of us have discussed, and considered the pros and cons — and here’s what we think.

tl;dr This design system is an excellent project for working in the open. There are a couple of things we need to be aware of, but that we are.

Benefits ✨

Working in the open has some really cool benefits:

Community involvement

We depend on the community for code, knowledge, inspiration and tutorials. Giving back to this community by sharing our work should very much be in the spirit of our company.

Transparency is cool

There are no secrets in a design system, and everything is there in the browser on the sites using it. We can’t see a reason why it’s necessary to develop it behind closed doors.

Awesome for recruiting

We do a lot of fun work on the team, and it’s super positive to be able to show some of it off. Having a public repo is like a batsignal for developers: come join us we’re awesome.

Fun & useful for contributors

There a personal benefit for contributors who can show off their work, and even ask peers for help.

Higher standard

Knowing that anyone and everyone can see your work, will hold us to a higher standard. If it helps us write better code and more useful commit messages, this is excellent.

Risks and concerns ⚠️

There are a couple of things we need to be aware of:

Security

Developers pushing to a public repo need to be consious of this. Our mindset should be that the moment we push a commit, that code is public knowledge. It’s important to make sure that certain details are never part of the repo: passwords, server names, deploy scripts and so on.

  • We can write guidelines around this.
  • We can consider Git Hooks as a preventive measure.
  • We can have an onboarding for new contributors.

Privacy

Developers working on the design system could feel they are being imposed with a transparency they don’t want. The people involved right now are excited about a public repo, but it’s possible to imagine someone else later feeling different about this.

  • If someone joining the project wants anonymity, they could use whatever GitHub account they want. It doesn’t have to contain their real name, or be the same one they’ve used before.

Licensing

Code in a public repo needs a license. We need to make sure that there are no conflicts between the license we choose, and the licenses of other parts of code we use.

  • We need to level up on licensing. 💪

Credits

Hat tips are polite anyway, but especially important in a public repo.

  • We can maintain a credits.md to say thank you for any code, tools and ideas we use.

Worth the extra effort?

There is potentially “more work” being created than when developing behind closed doors. It holds us to a higher standard on everything from hacks, commit messages and discussions in issues.

  • We can change our mind. If it turns out the benefits do not outweigh the extra effort, we can revert to private.

Do any other companies do this?

Yes! \o/ Here are some examples:
https://github.com/audi/audi-ui
https://github.com/buzzfeed/solid
https://github.com/cloudflare/cf-ui
https://github.com/Financial-Times/ft-origami
https://github.com/twbs/bootstrap
https://github.com/salesforce-ux/design-system
https://github.com/18F/web-design-standards

Stuff we need to figure out

  • Which license should our code have?
  • Which licenses are there on other code that we use?
  • Are there any conflicts between these licenses?

Anything else? Comments very welcome!

Icon system

Decide how to include icons in the framework

Notification bar

  • Link should be separate to down arrow (link to external page)
  • Mobile tweaks

Global namespace

Should all classes be prefixed with a global namespace?

.hw-

Advantage

  • Easier for humans to quickly see what comes from the design system
  • Easier for computers to search for the classes (can awesome tools be built?! 🤔 )

Disadvantage

  • Risk of it just being noise if all classes come from the design system anyway
  • Risk of naming conventions getting out of sync, as other people work on the code that are not familiar with the initial intentions

CTA block component

Need to be built: Call-to-action block as shown in the Article.sketch file.

Color

#f2f2f2 is missing

Buttons

Hover, and active state is not as in sketch file

Inputfield

Use exclamation mark from design system
Error text should be on left side, and not have a yellow background.
(I made an update in sketch if you want to have a look)

Error summary is still a bit off the sketch file.

Find a documentation tool

We want a documentation tool to make it easy to write docs.
Preferably it would be as closely linked to our code as possible.

Alternatives:

  • Catalog - seems quite nice...
  • KSS - got idea, but to complex?
  • Jekyll - to much like a cms?

Documentation - Intro, icons etc

Make the docs better!

Write flowchart telling a new user the following: (or something similar)

  • IF they are to just use it, do A
  • IF they want to modify it, then..
    • If they only need to do it on the site they're working on, do B
    • If they to add it for everyone, and it's a new component, do C
    • If they've found a bug, do D

Checkboxes

skjermbilde 2017-04-28 kl 11 42 47

The tick mark is still a bit of the original design.
Color when ticked and active state is #444444 (Sorry for the error in sketch)
Disabled state should be transparent inside the border.

Catalog.io -> Sidebar structure

Would be cool if we could get the sidebar looking something like this:

Introduction
Base
Typography
Colors
....
Components
    Button
    Dropdown
    ...

Open for suggestions!

Dropdown

Tag text color should be #444444
Active color on frame should be # #444444
Typo should be # 444444
Spacing on typo, arrow and the line should be 18 px
Spacing under the last row should be 24 px

Checkbox

Same smoothness on hover like imputfields, dropdown etc.
The checkmark needs the be the same as in sketch.

skjermbilde 2017-04-28 kl 11 42 47
The tick mark is still a bit of the original design.
Color when ticked and active state is #444444 (Sorry for the error in sketch)
Disabled state should be transparent inside the border.

List

Need to style lists

Breakpoints

Suggestion for breakpoints:

$breakpoint-small: 460px;
$breakpoint-medium: 720px;
$breakpoint-large: 940px;
$breakpoint-xlarge: 1200px;

Meeting agenda & notes - 23 May 2017

Agenda:

  • Discuss current state of project
  • Prioritise next steps
  • Discuss making repo public

Priority suggestions

  • Use system to build actual pages
  • Start implementing interactive component in CMS
  • Write docmentation
  • General cleanup

Icons

How should we handle icons?

Goal: Super easy to use, but flexible styling.

Options:

  • Inline seperate SVG's
    pros: only loading the icons beeing used / cons: needs to be done in the template.
  • Inline SVG's in hidden div and use href:xlink to load the SVG
    pros: able to set fill: color / cons: all icons are loaded on page load.
  • SVG as background image
    pros: not external dependencies, only loads the SVG's beeing used / cons: not able to set fill: color
  • Using an icon font
    pros: simple to use, can set color: color / cons: not semantic correct (should probably be avoided)...

Any thoughts/preferences on this?

Spacing

The 18 px spacing is missing

WYSIWYG component

For the articles and free text areas

  • Add margins and paddings to h1, h2, p etc

Acordian and dropdown

Typo should be 15 px, also when expanded.
Arrow should have same size as in sketch, and should be the same size in both.
The divider line ion dropdowns and accordion should have 18 spacing on both sides ans should be #e6e6e6
Accordions should also have the same frame as dropdowns.

All as specified in sketch

Table component

This is a complex component. The table has both filtering and fixed rows.

  • Look at simple/plain vanilla solutions out there and see if we can re-use anything
  • Implement this as table component

accordion

Typo should be Foundry Monoline PN Medium 15 px
18 px spacing on Right and left for both typo ans the line.
24 px spacing under the last row.

Typo should be 15 px, also when expanded.
Arrow should have same size as in sketch, and should be the same size in both.
The divider line ion dropdowns and accordion should have 18 spacing on both sides ans should be #e6e6e6
Accordions should also have the same frame as dropdowns.

All as specified in sketch

Browser support

Do we need a global benchmark for what we support?

If so, all components needs to pass this test before they're "Done"..

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.