Giter VIP home page Giter VIP logo

calcite-bootstrap's Introduction

This project is deprecated and is not recommended for future development.

Calcite Bootstrap

Calcite Bootstrap is a custom theme and a custom build system for Bootstrap. The theme is based on Calcite - a geo-centric design framework created by Esri. Calcite Bootstrap was built for developers who have experience working with Bootstrap and would like to integrate the Calcite theme and build system to their web pages and apps.

For more info about this framework, go to the documentation site

Using Calcite Bootstrap

There are two main ways to use Calcite Boostrap:

  • 1, Copying compiled css files into your project; or
  • 2, Installing via a npm and using a SASS build step in your project.

Bootstrap Javascript Components

Calcite Bootstrap does not include any javascript components itself - it simply provides a theme for Bootstrap components. If you elect to use any Bootstrap components that require javascript, you will need to include the Bootstrap javascript in your application.

For applications without a build system, we recommend loading the Bootstrap javascript from the BootstrapCDN.

If you have a build step, and installed calcite-bootstrap via npm, then bootstrap-sass was also installed, and you can include the scripts you need from node_modules/bootstrap-sass/assets/javascripts/...

Static Files

This is probably the easiest way. If you're looking to get up and running quickly, just download the latest release and move the zipped files to wherever you keep you assets. Be sure to use the documentation site and the main Bootstrap to copy and paste patterns, components, and even a sample html boilerplate.

NPM

To install Calcite Bootstrap with npm, type:

npm install --save-dev calcite-bootstrap

If you're using sass, be sure to add node_modules/calcite-bootstrap/dist/sass/ to your load path. If you're using gulp-sass you will add something like this:

gulp.task('sass', function () {
 return gulp.src('./sass/**/*.scss')
   .pipe(sass({
     includePaths: [
      './node_modules/bootstrap-sass/assets/stylesheets',
      './node_modules/calcite-bootstrap/dist/sass/'
     ]
    }).on('error', sass.logError))
   .pipe(gulp.dest('./css'));
});

If you are using grunt-sass, you should add it like this:

'sass': {
  options: {
    includePaths: [
      './node_modules/bootstrap-sass/assets/stylesheets',
      './node_modules/calcite-bootstrap/dist/sass/'
    ]
  },
  target: {
    files: {
      'path/to.css': 'path/to.scss'
    }
  }
}

Then in your main .scss file, you can just require the framework: @import "calcite-bootstrap";.

Contributing to Calcite Bootstrap

Installing Calcite Bootstrap was designed to be fairly painless. If you have any problems, be sure to submit an issue and use the label install issues.

Install Dependencies

Calcite-Boostrap has these main dependencies:

  • node.js
  • gulp
  1. Open Terminal (or your favorite command line tool. For OSX, I recommend iTerm) and check to see if you have Git installed just by entering $ git. You should see a list of commands for git if it is. If Git is not installed, OSX will automatically prompt you to install the XCode Command Line Developers Tools. Follow the prompts to complete the install.
  2. Visit nodejs.org to install Node. Check the install by entering $ node -v in Terminal
  3. Install Grunt by entering $ npm install -g gulp in Terminal.

If you run into errors during the installs, Mac Users my want to try using sudo. For example:

$ sudo npm install -g gulp

Fork the Repository

All the code for Calcite Bootstrap lives on GitHub. We use the fork and pull model to manage contribution.

  1. Fork the repository so you have your own copy ($ your-username/calcite-bootstrap)
  2. Clone the repo locally with $ git clone https://github.com/your-username/calcite-bootstrap
  3. Move into the clone repo: $ cd calcite-bootstrap

Setting up the Repository

  1. Install npm modules: $ npm install

Again, if you run into errors during, Mac Users my want to try using sudo.

When the installs complete run $ gulp serve to start the application. Open a new browser and navigate to http://localhost:9000.

Git Remote

You should also add Esri/calcite-bootstrap as a remote at this point. We generally call this remote branch 'upstream':

$ git remote add upstream https://github.com/Esri/calcite-bootstrap

Check your configuration: $ git remote -v

The results should look like:

origin	https://github.com/your-username/calcite-bootstrap.git (fetch)
origin	https://github.com/your-username/calcite-bootstrap.git (push)
upstream	https://github.com/Esri/calcite-bootstrap.git (fetch)
upstream	https://github.com/Esri/calcite-bootstrap.git (push)

Releasing to NPM

To prepare a release, you need an NPM account (npmjs.org), and need to be running on a mac or linux.

Most of the process is automated, but we have left two manual steps to ensure that the actual publishing to NPM is not done accidentally.

  1. increment the version number in package.json This will usually mean bumping the PATCH number (major.minor.patch). This version number will be used in the TAG that the next step will create @ github.
  2. run sh bin/release.sh This will create a branch, build the css, and pushes a release. NOTE: You can only push to the same version once. Re-release on the same version, you must manually destroy the release @ github.
  3. Got to the release @ github https://github.com/Esri/calcite-bootstrap/releases and copy the url to the tar.gz source code file.
  4. run npm publish <url to tar.gz file> - this will push the update to npm.

Licensing

Copyright © 2015-2018 Esri

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

A copy of the license is available in the repository's LICENSE file.

calcite-bootstrap's People

Contributors

ajturner avatar alaframboise avatar bsvensson avatar cassidyb avatar dbouwman avatar felfly avatar jgravois avatar jhough10 avatar jrowlingson avatar mjuniper avatar nwhittaker avatar raykendo avatar thebluedog avatar timmorey avatar umacgillivray 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

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

calcite-bootstrap's Issues

Calcite colors.scss needs review

This file was built early on. The color palette needs to be reviewed and updated where necessary.

// GRAYSCALE and // UI COLORS should match Calcite Web.

// BOOTSTRAP COLOR VARIABLES is a mapping of the variables used throughout Bootstrap to the color variables we should be using (from above).

Wells need styling review

Wells are pretty simple containers and not much styling to them. Just needs to be reviewed to make sure they fit in with Calcite styling if there are existing wells.

screen shot 2015-06-22 at 4 57 28 pm

Code needs Calcite styling

The module is currently using the default Bootstrap styling as shown below.

screen shot 2015-06-22 at 2 57 21 pm

Bootstrap Docs

Tasks

  • Remove hex colors and replace with Calcite variables
  • Add border radius back into the styling

Basic Forms needs Calcite styling

The module is currently using the default Bootstrap styling as shown below.

screen shot 2015-06-22 at 3 17 59 pm
screen shot 2015-06-22 at 3 18 08 pm

What's already done:

  • Variable $input-border is set to $gray variable defined in colors.scss.
  • Variable $input-border-focus is set to $link-color variable defined in the scaffolding.scss.
  • Variable $input-color-placeholder is set to $gray variable defined in colors.scss.

gh-pages branch

Any chance of spinning up a gh-pages branch so we can grab the latest compiled css and js and do some testing?

Calcite Header

This scss needs better documenting and a reusable partial defined. If SVG topi is going to be used, graphic fallback is needed.

screen shot 2015-06-22 at 3 29 04 pm

Alerts needs Calcite Styling

The module is currently using the default Bootstrap styling as shown below.

screen shot 2015-06-22 at 1 51 33 pm

Bootstrap Docs

Note that the colors used for the Alerts (_alerts.scss) are defined in the variables for Form States and Alerts (_formstates.scss)

Create tutorial videos

Record tutorial videos to demonstrate my typical workflow:

  • Reviewing Github Issue
  • Updating my local repo
  • Creating the branch
  • Making changes
  • Committing my work
  • Pushing the changes
  • Creating the PR

Text used as anchors has focus border

Noticed that when text is used as an anchor point for in-page navigation is clicked, it gets a blurred border as if it were in focus.

This needs to be removed.

screen shot 2015-06-25 at 5 53 05 pm

Don't deploy unless conditions are met

Travis CI does a build on commit. It does a whole pile of setup then in the deploy.sh file, we only actually do the deploy if some conditions are met (we are on master, it is not a pr, and we have the GH_TOKEN env variable available (https://github.com/Esri/calcite-bootstrap/blob/master/deploy.sh#L3).

Investigate if there is a way to not go through all that work if the conditions are not met.

Moving the before_script stuff in .travis.yml inside the if statement in deploy.sh helps but is insufficient because travis does a whole bunch of setup before it even gets to the before_script stuff.

Integrate Calcite iconography

  • Add import scss with calcite iconography
  • Build scss with icon classes
  • Build style guide documentation page for icons

Bootstrap vs Calcite-Bootstrap Baseline

Hey guys, I just wanted to document this to use as a baseline. This is a direct comparison of between virgin bootstrap and calcite-bootstrap. This app uses nav, tabs, menus, branding, tooltips and a modal dialog.

There are definitely subtle differences (and a few small issues that I'll document) but for the most part, it works pretty darn good!

Bootstrap

image

Calcite-Bootstrap

image

image

image

Replace all Hex Colors with Calcite Variables

Go through all the SCSS files and anywhere a hex color is used, replace with the nearest matching or specified Calcite color.

Document what the original hex code is and what variable it has been changed to for future consistency.

Close needs Calcite styling

This module is used for the button to close modals, alerts, panels and anything else dismissible. The module is currently using the default Bootstrap styling as shown below.

screen shot 2015-06-22 at 2 52 44 pm

Create a CSS build for the Patterns site

Use something like:

.bootstrap-styles { @import 'bootstrap'; }

To wrap the css for bootstrap so that it does not collide with the pattens css. This will need to be done with each release.

Navs Pills needs Calcite styling

The module is currently using the default Bootstrap styling as shown below.

screen shot 2015-06-22 at 4 26 05 pm

Since this module shares styling with tabs, they should be worked together.

Default navbar needs more styling to work at mobile screen sizes

The default navbar has the following issues at small screen sizes:

  1. The hamburger div for navbar collapsed disappears.
  2. The background styles are missing.

Here's the difference between navbar and navbar navbar-inverse.

<nav class="navbar navbar-inverse navbar-fixed-top"> /* All good */

image

<nav class="navbar navbar-fixed-top"> /* no bueno */

image

Buttons needs Calcite styling review

Some work has been done on the buttons.

The .btn-default class text color and border are defined by the $link-color variable defined in the scaffolding.scss. By doing this, the default buttons will always match the default color for links.

Custom rule for .btn-link was written so that it will perform like .btn-default rather than just the default gray.

Rounded corners were removed in another scss file.

The screenshot below shows the current styling.

screen shot 2015-06-22 at 2 20 13 pm

Navbar needs Calcite styling

The module is currently using the default Bootstrap styling as shown below.

screen shot 2015-06-22 at 4 13 31 pm

Slight changes have been made to the default navbar; height changed to 60px from 50px. The bootom margin has been set to 0px instead of a computed margin. A few colors have been altered, but should be set to use the color variables.

Navbar-brand needs styling

To be more consistent with bootstrap, we might want to make navbar-brand something like this:

.navbar-brand {
font-size: 18px;
}

image

image

Map UI: Custom Panels (Absolute and Inline-Block)

We've got this new, super cool framework to help people build sites with maps, why not add a few more UI components that devs can use to build map apps?

One of the main UI components required to develop any map app is a panel or window area that shows information such as a legend, list of attributes, more tools with functionality (e.g. driving directions). Sometimes panels are also used to replaced the popup window.

These panels are often implemented to appear in different locations, both 1) over the map or 2) inside the map view. They are also controlled by some type of user interaction or invoked by another control e.g. button, tab...

Currently calcite-bootstrap doesn't have any such controls, therefore, I propose we extend the default framework to provide this very handy Map UI-specific component. We could probably steal from panel, modal or just use the grid system to make this all happen.

Requirements:

  • Responsive
  • Control size
  • Set docking position
  • Set absolute vs inline-block
  • Nice transitions
  • Minimize/Maximize/Close

NOTE: This functionality may be coupled with a button group or li for tab controls. I have some ideas...

Wireframes

Panel controlled from button (Over map, doesn't consume space)
image

Panel invoked from map click (Consumes map space)
image

Here are some examples of how others implement this:

Basic Viewer
image

Simple Viewer
image

Public Information
image

WAB
image

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.