GithubHelp home page GithubHelp logo

2gis / makeup Goto Github PK

View Code? Open in Web Editor NEW
442.0 84.0 45.0 3.81 MB

JavaScript tool for comfortable manual testing of markup

Home Page: http://2gis.github.io/makeup

License: Mozilla Public License 2.0

JavaScript 80.13% CSS 13.19% HTML 6.54% Shell 0.15%

makeup's Introduction

English | Русский

Makeup logo

Build Status Gitter

What Is Makeup?

Makeup is a tool for development and comfortable quality assurance of markup on web projects. You'll certainly find it useful if your design is based on independent blocks and you prioritize stability and reliability.

Makeup is a JavaScript library. It provides visual interface for isolated development and quick manual regression testing of web pages, built from independent blocks.

Check out the interactive Makeup promotion site!

Why Should I Use Makeup?

Makeup allows you to:

  • Compare page design with the sample layout,
  • Monitor blocks for modifications and mismatching content,
  • Develop isolated blocks with ease.

Examples

Features of Makeup can be seen on the Makeup demo page.

Examples can be found in the demo/ subfolder. Just open any .html file in your browser.

Keyboard Shortcuts

Makeup has convenient keyboard shortcuts – see the cheatsheet.

How Do I Use Makeup?

Makeup Express

Express version of Makeup can be launched on any website except those with HTTP header content-security-policy. To use it, run the following script from the developer tools console of your browser:

var s=document.createElement('script');
s.src ="//2gis.github.io/makeup/autoload/script.js";
document.body.appendChild(s);

Quick Start With Makeup

  1. Make a web page with all resourses of your page's layout (markup, styles and images):

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <title>Makeup</title>
        <link rel="stylesheet" href="style.css"> <!-- project styles -->
    </head>
    <body>
        <button class="button">My button</button> <!-- markup -->
    </body>
    </html>
  2. Link the Makeup script and styles files to your page:

     <!DOCTYPE html>
     <html>
     <head>
         <title>Makeup</title>
         <link rel="stylesheet" href="style.css">
         <script src="makeup.js"></script><!-- Makeup -->
         <link rel="stylesheet" href="makeup.css"> <!-- Makeup styles -->
     </head>
     <body>
         <div style="display: none;">
             <button class="button">My button</button>
         </div>
     </body>
     </html>
  3. Initialize the Makeup

    Makeup(params, templating);

    See the full reference on initialization data format.

Development

You are welcome to take part in the development of Makeup. To start working, follow the instruction:

  1. Make sure that you have nodejs, npm and gulp installed.

  2. Fork this repository and clone your fork:

    git clone [email protected]:<your_name>/makeup.git
    cd makeup

    To commit your contribution, make a pull request (use the GitHub Flow).

    You can also clone this repository directly, but then you won't be able to push to it or make pull requests:

    git clone [email protected]:2gis/makeup.git
    cd makeup
  3. Launch Makeup with

    npm i
    npm start

    Demo page will then be available at http://localhost:3333/demo.

License

Makeup is published under the Mozilla Public License, version 2.0.

node-makeup

A project named "node-makeup" had been published in npm under the name "makeup" till 23.10.2015. You can find it at defunctzombie/node-makeup.

makeup's People

Contributors

artem-malko avatar chaptykov avatar diokuz avatar fobos avatar gitter-badger avatar lastw avatar nickvolynkin avatar porqz avatar riim avatar semenov 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar

makeup's Issues

Рекурсивная структура

Убрать зависимости от types, groupTypes и прочее. Входное дерево должно быть простым и любого уровня вложенности.

Auto full

Make button for inserting full data in auto mode for any block. (like smiley).

Also, fix smiley.

Minimize button

Make possibility to minimize makeup. Website behind it must be accessible.

Демо не работает

Ошибка в консоли

Uncaught TypeError: miniCardTemplate is not a function
    at Makeup._templating (http://2gis.github.io/makeup/demo/:40:37)
    at Makeup._renderItem (http://2gis.github.io/makeup/demo/dist/makeup.js:25281:42)
    at Makeup._obey (http://2gis.github.io/makeup/demo/dist/makeup.js:25142:22)
    at Makeup._init (http://2gis.github.io/makeup/demo/dist/makeup.js:24721:18)
    at Object.<anonymous> (http://2gis.github.io/makeup/demo/dist/makeup.js:24685:23)
    at fire (http://2gis.github.io/makeup/demo/dist/makeup.js:3148:30)
    at Object.fireWith [as resolveWith] (http://2gis.github.io/makeup/demo/dist/makeup.js:3260:7)
    at Object.deferred.(anonymous function) [as resolve] (http://2gis.github.io/makeup/demo/dist/makeup.js:3350:34)
    at http://2gis.github.io/makeup/demo/dist/makeup.js:24643:20
    at dispatch (http://2gis.github.io/makeup/demo/dist/makeup.js:4670:9)

MakeUp на http://ngs.ru/

Найдены следующие баги:

  • Мейкап появляется над содержимым сайта и скролится вместе с ним.
  • На body висит text-algin: center;, из-за чего названия блоков в мейкап так же центрируются.
  • Неплохо было-бы убивать адреса ссылок при просмотре верстки, чтобы никуда не редиректило в случае нажатия.

Init makeup on window.onload

Problem: some data, templates, images etc. may be unavailable before window.onload.

Delay Makeup initialization up to that event.

Кастомный jQuery

Неправильно работает вложенный jQuery: асинхронные методы в итоге вызывают внешний инстанс jQuery, а не внутренний. Например, если у внешнего барона нет, а у внутреннего есть, всё пропало.

Simple "onpage" mode

Короче, дело к ночи.

Надо запилить режим, когда подключаешь либу на страницу, дёргаешь её без параметров, она парсит эту страницу, разбивая её на блоки, выводя эти блоки в сайдбаре и т.п.

То есть смысл в быстром старте и быстрой оценки возможностей Makeup рядовым верстальщиком.

Невозможно установить пакет

Во-первых, ссылка в README.md на репозиторий, некорректная, исправьте пожалуйста.

Система: Mac OS X.
После клонирования проекта из репозитория и попытки установить, появляется ошибка следующего содержания:

andshulga@dev ~/shulga/test/makeup (master) $ npm i
-
> [email protected] preinstall /Users/andshulga/shulga/test/makeup/node_modules/gmsmith
> gm -version || convert -version

sh: gm: command not found
sh: convert: command not found
npm ERR! Darwin 14.3.0
npm ERR! argv "node" "/usr/bin/npm" "install"
npm ERR! node v0.12.0
npm ERR! npm  v2.1.2
npm ERR! code ELIFECYCLE

npm ERR! [email protected] preinstall: `gm -version || convert -version`
npm ERR! Exit status 127
npm ERR!
npm ERR! Failed at the [email protected] preinstall script.
npm ERR! This is most likely a problem with the gmsmith package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     gm -version || convert -version
npm ERR! You can get their info via:
npm ERR!     npm owner ls gmsmith
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/andshulga/shulga/test/makeup/npm-debug.log

Data default values

User should have as many freedom as we can give him.

Think about default values for item fields; structure freedom; simplicity of data structure.

Интернационализация промосайта.

Предлагаю интернационализировать промосайт. Сделать переключатель English | Русский, по умолчанию показывать английский. Строки к сайту я переведу.

Для перевода можно использовать www.transifex.com, он бесплатен для опенсорса.

Script for Makeup autoloading

Make script.js, place it on github.io, make code-snippet for inserting that script on any web-page.

Script should download Makeup, parseDom and then init Makeup with found blocks.

Тихое поведение на ините

После смены формата попытка инициализировать на массиве фейлится - списка блоков нет. Но и в консоли нет ничего.

Посмотреть, может ещё каких ошибок добавить.

gulp-clean to gulp-rimraf

gulp-clean считается depricated. Вместо него лучше использовать gulp-rimraf. А еще лучше npm-модуль del

cmd+T popup with fuzzy search

cmd+T is a common keyboard shortcut for fast "jump-to" search. We can make slack/sublime/github-like popup with fuzzy search.

Also we can use @romanyanke's idea with item tags.

image

image

image

Валидатор блоков

Индикатор у блока, горящий красным или зелёным, показывающий валидность по каким-то встроенным линтерам css/html (или даже w3c) и кастомным плагинам. По клику показывает отчёт.

Документирование компонентов

Привет,

Большое спасибо за интересный проект и активный выход в опенсорс! Меня очень впечатляет ваш серьезный подход к разработке верстки, отсюда собственно и вопрос, как вы документируете UI компоненты в компании?

Возможно вы ранее уже видели/слышали, что я активно занимаюсь идеей создания Style Guide Platform и мы с ребятами разрабатываем движек для этого дела - SourceJS. Вижу что ваш инструмент легко вписывается в наше идеальное видение процесса разработки UI, вот например интерфейс Clarify в SourceJS http://sourcejs.com/specs/example-bootstrap-bundle/carousel/?clarify=true&sections=1.

Clarify берет компонент из общей странницы документации, и позволяет его тестировать в разных шаблонах, упрощая подход Living Style Guide Driven Development. Мы ранее планировали добавить туда плагин для image regression тестирование, было бы интересно совместить ваш инструмент с Clarify, как расширение/плагин.

Если у вас есть подобные решения, я бы с удовольствием хотел бы с вами пообщаться и обменяться опытом.

Если вы еще активно не разрабатываете стайл гайды для своих компонентов, вам так же может пригодиться мой обзор инструментов http://www.smashingmagazine.com/2015/04/13/an-in-depth-overview-of-living-style-guide-tools/.

Возможность смены цвета фона

Привет!

Заметил, что было бы удобно иметь возможность менять цвет фона в мэйкапе.
В идеале было бы здорово прикрутить палитру цветов или поле с вводом нужного цвета.

DOM parse

method() which returns array of string with all blocks names on page.

Не работает поиск

Поиск по блокам/состояниям не работает. Он должен круто фильтровать левую панель, разворачивать нужные блоки, и т.д. и т.п.

Выполнение скрипта после отрисовки блока

Привет.

Подключили Makeup к стартеркиту на вебпак. Для некоторых компонентов, после отрисовки, нужно выполнять скрипт, чтобы компонент принял окончательный внешний вид (используются jquery плагины). Можно ли среагировать на переключение элемента, чтобы после вставки элемента на страницу его проинициализировать?

Сейчас решили проблему так:

import pugTemplate from './index.pug';
import render from '../calendar';

const data = {
  name: 'calendar',
  type: 'module',
  items: [{
    name: 'default.calendar.component',
    type: 'module',
  }]
};

function template({module: blockName}) {
  switch (blockName) {
    case 'default.calendar.component': {
      setTimeout(() => {render()}, 300);
      return pugTemplate({});
    }
  }
}

export {
  data,
  template,
}

здесь функцию render() нужно выполнить после отрисовки блока default.calendar.component.

miniCard template

Exclude miniCard template from index.html of demo to separate file or to js.

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.