All Projects → actmd → Abraham

actmd / Abraham

Licence: mit
Trackable application tours for Rails with i18n support

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to Abraham

translation-engine
A Rails engine for sending and receiving translations from Translation Server
Stars: ✭ 14 (-73.08%)
Mutual labels:  i18n, rails-engine
Icu
The new home of the ICU project source code.
Stars: ✭ 1,011 (+1844.23%)
Mutual labels:  i18n
Ember I18n Changeset Validations
ember-i18n support for ember-changeset-validations messages
Stars: ✭ 11 (-78.85%)
Mutual labels:  i18n
Parse Decimal Number
🏧 Parse a decimal number with i18n format support (localized decimal points and comma separators)
Stars: ✭ 33 (-36.54%)
Mutual labels:  i18n
React Boilerplate Cra Template
🔥 Setup Create React App with React Boilerplate. Highly scalable & Best DX & Performance Focused & Best practices.
Stars: ✭ 859 (+1551.92%)
Mutual labels:  i18n
Electron Create Menu
a default menu for your electron applications, with convenience functions for multiplatform use and i18n.
Stars: ✭ 35 (-32.69%)
Mutual labels:  i18n
Flask Humanize
Common humanization utilities for Flask applications
Stars: ✭ 26 (-50%)
Mutual labels:  i18n
Eslint Plugin Vue I18n
🌐 ESLint plugin for Vue I18n
Stars: ✭ 50 (-3.85%)
Mutual labels:  i18n
Goloc
A flexible tool for application localization using Google Sheets.
Stars: ✭ 42 (-19.23%)
Mutual labels:  i18n
Parrot
Self-hosted Localization Management Platform built with Go and Angular
Stars: ✭ 967 (+1759.62%)
Mutual labels:  i18n
I18n.cr
Internationalization API ( i18n )
Stars: ✭ 31 (-40.38%)
Mutual labels:  i18n
Next Translate
Next.js plugin + i18n API for Next.js 10 🌍 - Load page translations and use them in an easy way!
Stars: ✭ 867 (+1567.31%)
Mutual labels:  i18n
Texterify
The localization management system.
Stars: ✭ 37 (-28.85%)
Mutual labels:  i18n
I18n
Internationalization (i18n) library for Ruby
Stars: ✭ 865 (+1563.46%)
Mutual labels:  i18n
Vite Plugin Vue I18n
🌐 Vite plugin for Vue I18n
Stars: ✭ 48 (-7.69%)
Mutual labels:  i18n
Flarum I18n Zh
Flarum 国际化语言包
Stars: ✭ 10 (-80.77%)
Mutual labels:  i18n
Corpus Christi
Church management suite, open source, fully internationalized
Stars: ✭ 29 (-44.23%)
Mutual labels:  i18n
Ununiga
[은는이가] 한글 조사(助詞) 대응 I18n engine extension
Stars: ✭ 34 (-34.62%)
Mutual labels:  i18n
Autoupdate
🆙 基于MFC实现的自动更新模块
Stars: ✭ 51 (-1.92%)
Mutual labels:  i18n
Kohei.dev
🌎 A Production-level Single Page App with Server Side Rendering
Stars: ✭ 50 (-3.85%)
Mutual labels:  i18n

Abraham

Build Status

Guide your users in the one true path.

Watercolor Sheep

Abraham injects dynamically-generated Shepherd JavaScript code into your Rails application whenever a user should see a guided tour. Skip a tour, and we'll try again next time; complete a tour, and it won't show up again.

  • Define tour content with simple YAML files, in any/many languages.
  • Organize tours by controller and action.
  • Plays nicely with Turbolinks.
  • Ships with two basic CSS themes (default & dark) -- or write your own

Requirements

Abraham needs to know the current user to track tour views, e.g. current_user from Devise.

Installation

Add abraham to your Gemfile:

gem 'abraham'

Install the gem and run the installer:

$ bundle install
$ rails generate abraham:install
$ rails db:migrate

Install the JavaScript dependencies:

$ yarn add [email protected]^3.4.0 [email protected]^2.2.0 [email protected]^6.0.0-beta

Require abraham in app/assets/javascripts/application.js

//= require abraham

Require a CSS theme in app/assets/stylesheets/application.scss

*= require abraham/theme-default

Abraham provides the following themes:

  • theme-default
  • theme-dark

Update config/abraham.yml if you choose a different theme:

defaults: &defaults
  :tour_options: '{ defaultStepOptions: { classes: "theme-dark" } }'

You can also write your own Shepherd theme based on Shepherd's default CSS.

Tell Abraham where to insert its generated JavaScript in app/views/layouts/application.html.erb, just before the closing body tag:

<%= abraham_tour %>
</body>
</html>

Defining your tours

Define your tours in the config/tours directory. Its directory structure should mirror your application's controllers, and the tour files should mirror your actions/views.

config/
└── tours/
    └── blog/
    │   ├── show.en.yml
    │   └── show.es.yml    
    └── articles/
        ├── index.en.yml
        ├── index.es.yml
        ├── show.en.yml
        └── show.es.yml

NB: You must specify a locale in the filename, even if you're only supporting one language.

Tour content

A tour is composed of a series of steps. A step may have a title and must have a description. You may attach a step to a particular element on the page, and place the callout to the left, right, top, or bottom.

intro:
  steps:
    1:
      text: "Welcome to your dashboard! This is where we'll highlight key information to manage your day."
    2:
      title: "Events"
      text: "If you're participating in any events today, we'll show that here."
      attachTo:
        element: ".dashboard-events"
        placement: "right"
    3:
      title: "Search"
      text: "You can find anything else by using the search bar."
      attachTo:
        element: ".navbar-primary form"
        placement: "bottom"

Abraham takes care of which buttons should appear with each step:

  • "Later" and "Continue" buttons on the first step
  • "Exit" and "Next" buttons on intermediate steps
  • "Done" button on the last step

Abraham tries to be helpful when your tour steps attach to page elements that are missing:

  • If your first step is attached to a particular element, and that element is not present on the page, the tour won't start. (#28)
  • If your tour has an intermediate step attached to a missing element, Abraham will skip that step and automatically show the next. (#6)

Testing your tours

Abraham loads tour definitions once when you start your server. Restart your server to see tour changes.

If you'd like to run JavaScript integrations tests without the Abraham tours getting in the way, clear the Abraham configuration in your test helper, e.g.

Rails.application.configure do
  config.abraham.tours = {}
end

Full example

We provide a small example app that implements abraham, so you can see it in action.

Upgrading from version 1

Abraham v1 was built using Shepherd 1.8, v2 now uses Shepherd 6 -- quite a jump, yes.

If you were using Abraham v1, you'll want to take the following steps to upgrade:

  1. Update your gem to the latest version
  2. Fix your yarn dependencies to use the right versions
  3. Shepherd no longer provides a set of themes. Abraham maintains two of the legacy themes: default and dark. You'll want to choose one of those or migrate your theme to the new Shepherd structure.
  4. Abraham now exposes the entire Shepherd configuration object, so your abraham.yml file should now fully define the tour_options value instead of default_theme
  5. There's been a slight change to initializers/abraham.rb. Replace yours with the latest.

If you have any trouble at all, please submit an issue for assistance!

Contributing

Contributions are welcome!

Create a feature branch (using git-flow) and submit as a pull request.

Everyone interacting in Abraham's codebase, issue tracker, etc. is expected to follow the Contributor Covenent Code of Conduct.

Testing

Testing locally

This Rails engine contains a test app called dummy with controller and system tests. They'll all get run with rails t.

Please note that if you change anything in the lib/generators folder (i.e. configuration, intializer, migration) you'll need to migrate the dummy app accordingly.

Final testing should be done in a standalone Rails app, following the README instructions.

To install the abraham gem with a local path:

gem 'abraham', path: '~/Workspace/abraham'

Automated testing

We use TravisCI to automatically test this engine with Rails 5.1, 5.2, and 6.0. For test history, venture over to TravisCI.

Releasing

Create a git-flow release:

$ git flow release start VERSION_NUMBER

Edit lib/abraham/version.rb and increase the version number.

Build the gem and push to Rubygems:

$ rake build
$ gem push pkg/abraham-VERSION_NUMBER.gem

Finish the git-flow release and push to GitHub:

$ git flow release finish
$ git push origin develop
$ git push origin master
$ git push --tags
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].