GithubHelp home page GithubHelp logo

syndesisio / syndesis-ui Goto Github PK

View Code? Open in Web Editor NEW
14.0 23.0 28.0 5.59 MB

The front end application or UI for Syndesis - a flexible, customizable, cloud-hosted platform that provides core integration capabilities as a service. It leverages Red Hat's existing product architecture using OpenShift Online/Dedicated and Fuse Integration Services.

Home Page: https://syndesis.io/

JavaScript 0.87% TypeScript 69.95% HTML 21.31% CSS 6.85% Shell 1.01%
redhat ipaas angular-cli typescript ui angular angular4 angular2 syndesis

syndesis-ui's Introduction


Repos moved

This repository is not longer active and has been moved to https://github.com/syndesisio/syndesis (code & issues)


Syndesis UI

CircleCI Commitizen friendly

The front end application or UI for Syndesis - a flexible, customizable, cloud-hosted platform that provides core integration capabilities as a service. It leverages open source technologies like Apache Camel and OpenShift to provide a rock-solid user experience.

For the middle tier API that this client communicates with, please see the syndesis-rest repo.

Table of Contents

Quick Start

You can follow these steps if it's your first time setting up Syndesis, or if you want a fresh local installation to replace an existing one.

  1. Make sure you have installed node version >= 6.x.x and Yarn version >= 0.18.1.

  2. Get a developer deployment of Syndesis running in a Minishift environment as described in the Syndesis Quickstart. Most are specific to your environment, so follow the links below for a quick setup:

  1. Get a local developer UI with hot reloading, using the Syndesis backend running on Minishift:
# Clone our repo:
$ git clone https://github.com/syndesisio/syndesis-ui.git

# Change directory to Syndesis:
$ cd syndesis-ui

# Start up Minishift
$ minishift start

# Make sure Minishift is running:
$ minishift status

# Which should look like:
Minishift:  Running
Profile:    minishift
OpenShift:  Running (openshift v3.6.0+c4dd4cf)
DiskUsage:  11% of 17.9G

# Log into OpenShift with developer account
# Password: whatever you like
$ oc login -u developer

# Set environment variables to point to Minishift resources:
$ eval $(minishift oc-env)
$ eval $(minishift docker-env)

# For a fresh install of Syndesis:
$ ./scripts/syndesis-install --clean --pull

# Install the dependencies:
$ yarn install

# Start the UI server:
$ yarn start:minishift

The yarn start:minishift command works when it can properly detect your local development machine's IP address. A proxy server inside the minishift deployment will use that IP address to connect back to the development server being run by the yarn command. If detection of the IP is failing for you, then set the SYNDESIS_DEV_LOCAL_IP env variable to your local machine's IP address before running the yarn yarn start:minishift command.

Open the Syndesis UI in your browser from the command line by running:

# To connect with Syndesis backend you don't have to use http://localhost:4200 url.
# The url has a structure similar to http://syndesis-ui-default.192.168.42.205.nip.io

# You can try to obtain it directly from Minishift configuration with one of the following commands.

# on macOS
$ open https://$(oc get routes syndesis --template "{{.spec.host}}")

# on linux
$ xdg-open https://$(oc get routes syndesis --template "{{.spec.host}}")

# on windows
$ start https://$(oc get routes syndesis --template "{{.spec.host}}")

A smoke test to verify you are ready to work is to add any content at the beginning of src/app/app.component.html and verify you see the modification in the main page of the application.

If you are having issues with Minishift, you can also use https://0.0.0.0:4200/ to access the UI for quick development, but it will not use Minishift resources, so the app will not work properly.

In a separate tab, you might want to run unit tests and lint checks as you code. See below for more information on how to do that.

Day-to-Day Workflow

# Start up Minishift
$ minishift start

# Log into OpenShift with developer account
# Password: whatever you like
$ oc login -u developer

# Set environment variables to point to Minishift resources:
$ eval $(minishift oc-env)
$ eval $(minishift docker-env)

# Start the UI server:
$ yarn start:minishift

Follow the instructions above for opening the Syndesis UI in your browser.

At the end of the day you might want to stop Minishift: $ minishift stop

Technology Stack

Included in this stack are the following technologies:

File Structure

We use the component approach in our starter. This is the new standard for developing Angular apps and a great way to ensure maintainable code by encapsulation of our behavior logic. A component is basically a self contained app, usually in a single file or a folder with each concern as a file: style, template, specs, and component class.

syndesis-ui/
 │
 ├──docs/                         * our documentation
 |   ├──commands.md               * additional cli commands available to us
 |   ├──contributing.md           * contribution guidelines
 |   ├──entities.md               * entities/models and their relationships for reference
 │   ├──faq.md                    * frequently asked questions about using syndesis
 │   ├──overview.md               * a technical overview for understanding the project
 │   └──typescript.md             * some typescript tips and resources
 │
 ├──src/                          * our source files that will be compiled to javascript
 │   │
 │   ├──app/                      * our Angular 2 application
 │   │   │
 │   │   ├──user/                 * an example 'user' component, based on an entity/model. can be nested further.
 │   │   │   ├──user.component.ts * the primary Angular component file; essentially a controller + directive combined
 │   │   │   ├──user.html         * our HTML user template for the user component
 │   │   │   └──user.spec.ts      * our unit test for the user component
 │   │   │
 │   │   ├──app.component.ts      * a simple version of our App component components
 │   │   └──app.spec.ts           * a simple test of components in app.ts
 │   │
 │   ├──assets/                   * static assets are served here
 │   │   ├──robots.txt            * for search engines to crawl your website
 │   │   └──service-worker.js     * ignore this. Web App service worker that's not complete yet
 │   │
 │   ├──polyfills.ts      * our polyfills file
 │   └--index.html                * our primary layout that contains subviews
 │
 ├──.gitignore                    * let git know which files to ignore and not stage for commit
 ├──karma.conf.js                 * karma, our test runner, config file
 ├──LICENSE                       * Syndesis is available for use under the Apache 2.0 license
 ├──npm-shrinkwrap.json           * npm's way of allowing us to control exact versions of dependencies
 ├──package.json                  * what npm uses to manage it's dependencies
 ├──README.md                     * this exact file :)
 ├──tsconfig.json                 * typescript compiler config
 ├──tslint.json                   * typescript lint config

Getting Started

Dependencies

What you need to run this app:

  • node (brew install node for OS X users)
  • yarn (see https://yarnpkg.com/en/docs/install)
  • angular-cli (optional, but useful for development. see here)
  • Ensure you're running the latest versions Node v6.x.x+ and Yarn

You do not need to install Angular CLI globally, but we recommend it if you'd like to use the convenient commands it provides, or any of the ng commands we reference below.

Formatting

To make sure your code is formatted consistently with the rest of the team's, you can run the following command to prettify it:

yarn format

Committing Changes

The repo is commitizen friendly, after making some changes:

yarn commit

to commit them. yarn commit is the same as running git cz in this case. So, you can use all the git commit options, for example: yarn commit -am 'Blah blah blah''.

Don't forget to add your files to staging first with git add -A. This is a git commit tool, not a total git replacement.

Documentation

We use Compodoc for documentation, or here to see how to format comments. Files get generated automatically in the /documentation directory. Read the documentation here to see how to properly document features. You can automatically generate and run docs using Yarn:

yarn compodoc

Or manually with compodoc -s, or compodoc if you want it to simply generate the files in the default /documentation directory and run it with an HTTP server.

Production

Requires having angular-cli installed globally.

ng serve --prod -aot

Testing

Watch and Run Unit Tests

ng test or yarn test

Run Tests without Watch

ng test --watch=false

Linting

To run the linter: yarn lint

Configuring

Configuration files live in /config. Configuration files are currently available for Webpack, Karma, and Protractor.

Contributing

Pull requests are always welcome. Please read through our Contribution guidelines for submitting improvements.

New feature development should generally follow these guidelines.

Data Mapper

To update the data mapper, change the commit SHA in package.json to pick up the desired code revision, then run yarn install. Verify that the projects still builds by running yarn start:prod and adjust the code as necessary based on the data mapper example usage in the README.

When updating the SHA you should also run yarn copy:assets to bring over any assets the data mapper component needs, this tasks copies them all to src/assets/dm

syndesis-ui's People

Contributors

abkieling avatar astefanutti avatar chirino avatar codercowboy avatar cunningt avatar deeleman avatar dsimansk avatar fusesource-ci avatar gashcrumb avatar igarashitm avatar jbakermd avatar jimmidyson avatar johnpoth avatar jonathanchristison avatar kahboom avatar lvydra avatar paoloantinori avatar pure-bot[bot] avatar rhuss avatar riccardo-forina avatar zregvart avatar

Stargazers

 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

syndesis-ui's Issues

User Component

Overview

Organize User component to act as a Parent Component, with its subcomponents nested as Child Components. Examples are: register, login, reset, and profile.

These Child Components should inherit data from the Parent Component (UserComponent).

Add Upstream Logos

Overview

Add upstream square and full text logos for iPaaS, if possible.

Rename WatchTypes to CollectionTypes

Since this was grabbed from a previous implementation we've some legacy here, but now's a good time to rename the WatchTypes constants to CollectionTypes so it's more clear.

Make sourcing env scripts configurable

Overview

Once #44 is completed, you'll be able to run npm start:minikube without having to source for Minikube (Kubernetes), or npm start:minishift for Minishift (OpenShift), but it would be nice to have it as a completely configurable option, possibly with Minikube as the default value.

Reference

Connections: Connection Library

Overview

Write the logic and UI for the Connection Library component.

Features

  • Use JSON for dummy data for now.
  • Filter and sort list of data.
  • Search through list of data.
  • Kabob menu for Edit, Duplicate, and Delete links.
  • Infinite scrolling.
  • Hover effect of cards, according to PatternFly Card View.
  • When filtered, another row shows up below the toolbar that shows the results as displayed in the PatternFly Card View.

Reference

InVision Designs:

FTUE - Guided Tour

Overview

Write the logic and UI for the Guided Tour page as part of the FTUE.

Reference

iPaaS Public Demo

Overview

Provide a demo that is publicly available (or maybe only when connected to the RH VPN) for others to view the progress of the front end application. Research whether or not this would be possible without the requirement of the backend or the Fabric8 platform running. This could be a live running instance of iPaaS or a build directory that can be loaded with Rawgit (would require complete independence from the backend).

Browser & terminal errors: Critical dependency: the request of a dependency is an expression

Overview

These started after updating Webpack, which required that we adjust our configuration settings. They are appearing both in the browser console and the terminal. They seem to be related to the same ngModule factory loader library.

Terminal Warnings

WARNING in ./~/@angular/core/src/linker/system_js_ng_module_factory_loader.js
45:15 Critical dependency: the request of a dependency is an expression

WARNING in ./~/@angular/core/src/linker/system_js_ng_module_factory_loader.js
57:15 Critical dependency: the request of a dependency is an expression

screenshot 2016-09-22 19 18 25

### Browser Console Errors
[WDS] Warnings while compiling.
webpack-dev-server.js:3 ./~/@angular/core/src/linker/system_js_ng_module_factory_loader.js
45:15 Critical dependency: the request of a dependency is an expression
CriticalDependencyWarning: Critical dependency: the request of a dependency is an expression
    at SystemImportContextDependency.getWarnings (/Users/kahboom/Projects/hawtio-ipaas/node_modules/webpack/lib/dependencies/SystemImportContextDependency.js:23:4)
    at /Users/kahboom/Projects/hawtio-ipaas/node_modules/webpack/lib/Compilation.js:640:21
    at Array.forEach (native)
    at /Users/kahboom/Projects/hawtio-ipaas/node_modules/webpack/lib/Compilation.js:639:22
    at Array.forEach (native)
    at Compilation.reportDependencyWarnings (/Users/kahboom/Projects/hawtio-ipaas/node_modules/webpack/lib/Compilation.js:638:9)
    at Compilation.<anonymous> (/Users/kahboom/Projects/hawtio-ipaas/node_modules/webpack/lib/Compilation.js:497:8)
    at Array.forEach (native)
    at Compilation.finish (/Users/kahboom/Projects/hawtio-ipaas/node_modules/webpack/lib/Compilation.js:496:15)
    at Compiler.<anonymous> (/Users/kahboom/Projects/hawtio-ipaas/node_modules/webpack/lib/Compiler.js:434:15)
    at /Users/kahboom/Projects/hawtio-ipaas/node_modules/tapable/lib/Tapable.js:152:11
    at Compilation.<anonymous> (/Users/kahboom/Projects/hawtio-ipaas/node_modules/webpack/lib/Compilation.js:444:10)
    at /Users/kahboom/Projects/hawtio-ipaas/node_modules/webpack/lib/Compilation.js:420:12
    at /Users/kahboom/Projects/hawtio-ipaas/node_modules/webpack/lib/Compilation.js:332:10
    at /Users/kahboom/Projects/hawtio-ipaas/node_modules/webpack/node_modules/async/lib/async.js:52:16
    at done (/Users/kahboom/Projects/hawtio-ipaas/node_modules/webpack/node_modules/async/lib/async.js:246:17)
    at /Users/kahboom/Projects/hawtio-ipaas/node_modules/webpack/node_modules/async/lib/async.js:44:16
    at /Users/kahboom/Projects/hawtio-ipaas/node_modules/webpack/lib/Compilation.js:332:10
    at /Users/kahboom/Projects/hawtio-ipaas/node_modules/webpack/node_modules/async/lib/async.js:52:16
    at done (/Users/kahboom/Projects/hawtio-ipaas/node_modules/webpack/node_modules/async/lib/async.js:246:17)
    at /Users/kahboom/Projects/hawtio-ipaas/node_modules/webpack/node_modules/async/lib/async.js:44:16
    at /Users/kahboom/Projects/hawtio-ipaas/node_modules/webpack/lib/Compilation.js:332:10

screenshot 2016-09-23 14 05 01

screenshot 2016-09-23 14 05 23

Integrate PatternFly: JavaScript

We are currently using Angular 2, Webpack 2, and are interested in using Bootstrap 4. At the moment, it appears that PatternFly does not use Bootstrap 4, rather is still using Bootstrap 3.x. In addition, we cannot use angular-patternfly since it has not been adapted for use with Angular 2. As such, we are having to resort to using ngBootstrap, since it uses Bootstrap 4 and was made for use with Angular 2. We will only be using some of the PatternFly CSS for the purposes of branding until it is natively compatible with Bootstrap 4 (for CSS) and Angular 2 (for JS).

CSS Issue

Loading the PatternFly CSS has been a bit troublesome, as Webpack's LESS loader has a bug with respecting relative paths (the transpiled CSS is also not valid CSS), and a Sass file is not offered. Because the transpiled CSS is not valid CSS (it has LESS symbols), it is likely an npm build issue, so for now we will simply have to reference it via a CDN in one of our own Sass files. I have also looked at patternfly-sass to be able to at least use PatternFly's Sass files, however, npm is not installing it to the project properly as a GitHub repo with a trackable version using a tag, and, unfortunately, it is not available on npm.

I've been in touch with the PatternFly team regarding the inability to load CSS or LESS properly from the main patternfly npm package using Webpack (due to that bug with Webpack's less-loader here: webpack-contrib/less-loader#76). Please see relevant issues here: patternfly/patternfly#458, patternfly/patternfly-demo-app#10

We realize that we are on the bleeding edge here and will run into some challenges, but this will allow for easier maintainability into the near future, as contributors will not have to upgrade from one major version to the next. There are many moving components in terms of technology, so we want to keep up with the technologies that would result in the biggest changes when/if requiring an upgrade. In this case, that means Webpack 2, Angular 2, and Bootstrap 4.

I'll be creating a separate issue regarding PatternFly CSS loading.

Integrate PatternFly: CSS (#9)

Disconnect openshift oauth client

We won't need the kubernetes access token directly as we'll be communicating with our middle tier, so we don't need to couple the frontend to the openshift login flow.

Remove Hash from URL

Overview

Ability to use routes without a prepended hash, as with Angular 1.x's html5mode.

C3 Reusable Common Components

Overview

Create reusable C3 components, which will act as a Child Component, for any Parent Component that calls it, and it will inherit data from said Parent Component. The C3 component will be an example of common components that will be reused throughout the application, much like directives were in Angular 1.x, and will be stored in a directory called common.

e2e tests won't run

Been looking into this issue this afternoon:

~/Work/src/hawtio-ipaas
] npm run e2e

> [email protected] pree2e /home/gashcrumb/Work/src/hawtio-ipaas
> npm run webdriver:update -- --standalone


> [email protected] webdriver:update /home/gashcrumb/Work/src/hawtio-ipaas
> npm run webdriver-manager update "--standalone"


> [email protected] webdriver-manager /home/gashcrumb/Work/src/hawtio-ipaas
> webdriver-manager "update"

selenium standalone is up to date.
chromedriver is up to date.

> [email protected] e2e /home/gashcrumb/Work/src/hawtio-ipaas
> npm run protractor


> [email protected] protractor /home/gashcrumb/Work/src/hawtio-ipaas
> protractor

[15:24:07] I/direct - Using ChromeDriver directly...
[15:24:07] I/launcher - Running 1 instances of WebDriver

/home/gashcrumb/Work/src/hawtio-ipaas/node_modules/selenium-webdriver/http/index.js:365
      onError(new Error(message));
              ^
Error: ECONNREFUSED connect ECONNREFUSED 127.0.0.1:40954
    at ClientRequest.<anonymous> (/home/gashcrumb/Work/src/hawtio-ipaas/node_modules/selenium-webdriver/http/index.js:365:15)
    at emitOne (events.js:96:13)
    at ClientRequest.emit (events.js:188:7)
    at Socket.socketErrorListener (_http_client.js:310:9)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at emitErrorNT (net.js:1276:8)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)
From: Task: WebDriver.createSession()
    at acquireSession (/home/gashcrumb/Work/src/hawtio-ipaas/node_modules/selenium-webdriver/lib/webdriver.js:62:22)
    at Function.createSession (/home/gashcrumb/Work/src/hawtio-ipaas/node_modules/selenium-webdriver/lib/webdriver.js:295:12)
    at Driver (/home/gashcrumb/Work/src/hawtio-ipaas/node_modules/selenium-webdriver/chrome.js:778:38)
    at Direct.getNewDriver (/home/gashcrumb/Work/src/hawtio-ipaas/node_modules/protractor/built/driverProviders/direct.js:65:26)
    at Runner.createBrowser (/home/gashcrumb/Work/src/hawtio-ipaas/node_modules/protractor/built/runner.js:182:43)
    at /home/gashcrumb/Work/src/hawtio-ipaas/node_modules/protractor/built/runner.js:255:30
    at _fulfilled (/home/gashcrumb/Work/src/hawtio-ipaas/node_modules/q/q.js:834:54)
    at self.promiseDispatch.done (/home/gashcrumb/Work/src/hawtio-ipaas/node_modules/q/q.js:863:30)
    at Promise.promise.promiseDispatch (/home/gashcrumb/Work/src/hawtio-ipaas/node_modules/q/q.js:796:13)
    at /home/gashcrumb/Work/src/hawtio-ipaas/node_modules/q/q.js:556:49
[15:24:08] E/launcher - Process exited with error code 1

Move some backend bits over to ipaas-api

Since ipaas-client is only going to use ipaas-api we don't need bits for talking to forge/kubernetes/git kicking around in ipaas-client. We should move these to https://github.com/redhat-ipaas/ipaas-api.

To move:

  1. These scripts
  2. This block of code
  3. The forge service
  4. The kubernetes service
  5. The git service
  6. The forge, kubernetes helper functions here along with the related tests.
  7. This whole module might be worth converting some of it into docs for the forge/kubernetes code.

@kahboom anything else you can think of?

Integrations: Configure Connection for Integration

Overview

Write the logic and UI for the Connection Configurations page for a specific Integration.

Reference

  • N/A

InVision Designs:

  • N/A

Also related to 'Connections' somewhat, as it'll involve rendering a form for the connector's configurable attributes.

Silence/Disable Detailed Build Messages

Overview

The build messages can be useful when debugging, but should be silenced even in dev mode, unless some type of --debug flag is passed, or something similar, which can include logging. It looks a bit messy and could be a lot cleaner:

screenshot 2016-09-29 10 44 43

It would also be nice to see something other than that 'OK' message at the end, and instead something helpful like Running on http://localhost:1337.

Error from `npm start`

Not sure if it's Windows specific or not, but after updating locally, clearing out node_modules and running npm install, npm start gives me:

C:\Source\hawtio-ipaas\node_modules\webpack\lib\webpack.js:16                                                                          
                throw new WebpackOptionsValidationError(webpackOptionsValidationErrors);                                               
        ^                                                                                                                              
WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not ma
tch the API schema.                                                                                                                    
 - configuration has an unknown property 'tslint'. These properties are valid:                                                         
   object { amd?, bail?, cache?, context?, dependencies?, devServer?, devtool?, entry, externals?, loader?, module?, name?, node?, outp
ut?, plugins?, profile?, recordsInputPath?, recordsOutputPath?, recordsPath?, resolve?, resolveLoader?, stats?, target?, watch?, watchO
ptions? }                                                                                                                              
   For typos: please correct them.                                                                                                     
   For loader options: webpack 2 no longer allows custom properties in configuration.                                                  
     Loaders should be updated to allow passing options via loader options in module.rules.                                            
     Until loaders are updated one can use the LoaderOptionsPlugin to pass these options to the loader:                                
     plugins: {                                                                                                                        
       new webpack.LoaderOptionsPlugin({                                                                                               
         // test: /\.xxx$/, // may apply this only for some modules                                                                    
         options: {                                                                                                                    
           tslint: ...                                                                                                                 
         }                                                                                                                             
       })                                                                                                                              
     }                                                                                                                                 
 - configuration.module has an unknown property 'preLoaders'. These properties are valid:                                              
   object { exprContextCritical?, exprContextRecursive?, exprContextRegExp?, exprContextRequest?, loaders?, noParse?, rules?, unknownCo
ntextCritical?, unknownContextRecursive?, unknownContextRegExp?, unknownContextRequest?, wrappedContextCritical?, wrappedContextRecursi
ve?, wrappedContextRegExp? }                                                                                                           
   Options affecting the normal modules (`NormalModuleFactory`).                                                                       
 - configuration.node.global should be a boolean.                                                                                      
 - configuration.resolve has an unknown property 'modulesDirectories'. These properties are valid:                                     
   object { alias?, aliasFields?, cachePredicate?, descriptionFiles?, enforceExtension?, enforceModuleExtension?, extensions?, fileSyst
em?, mainFields?, mainFiles?, moduleExtensions?, modules?, plugins?, resolver?, symlinks?, unsafeCache? }                              
 - configuration.resolve.extensions[0] should not be empty.                                                                            
    at webpack (C:\Source\hawtio-ipaas\node_modules\webpack\lib\webpack.js:16:9)                                                       
    at processOptions (C:\Source\hawtio-ipaas\node_modules\webpack-dev-server\bin\webpack-dev-server.js:269:17)                        
    at Object.<anonymous> (C:\Source\hawtio-ipaas\node_modules\webpack-dev-server\bin\webpack-dev-server.js:297:1)                     
    at Module._compile (module.js:556:32)                                                                                              
    at Object.Module._extensions..js (module.js:565:10)                                                                                
    at Module.load (module.js:473:32)                                                                                                  
    at tryModuleLoad (module.js:432:12)                                                                                                
    at Function.Module._load (module.js:424:3)                                                                                         
    at Module.runMain (module.js:590:10)                                                                                               
    at run (bootstrap_node.js:394:7)                                                                                                   
    at startup (bootstrap_node.js:149:9)                                                                                               
    at bootstrap_node.js:509:3                                                                                                                                                                                                                                                

@kahboom ping

E2E Tests

Create E2E tests for majority of components

Get tests running properly

Currently npm test yields:

START:
Chrome 53.0.2785 (Linux 0.0.0) LOG: '[Admin]', '`Admin` component loaded asynchronously'
11 10 2016 12:55:06.469:WARN [reporter]: SourceMap position not found for trace: undefined
Chrome 53.0.2785 (Linux 0.0.0) ERROR
  Uncaught Error: Cannot find module "angular2/testing"
  at config/spec-bundle.js:43811

Finished in 1.38 secs / 0 secs

SUMMARY:
✔ 0 tests completed

Looks like the current *.spec.ts files need to be updated to pull in the right imports.

@kahboom FYI

Integrate PatternFly: CSS

We are currently using Angular 2, Webpack 2, and are interested in using Bootstrap 4. At the moment, it appears that PatternFly does not use Bootstrap 4, rather is still using Bootstrap 3.x. In addition, we cannot use angular-patternfly since it has not been adapted for use with Angular 2. As such, we are having to resort to using ngBootstrap, since it uses Bootstrap 4 and was made for use with Angular 2. We will only be using some of the PatternFly CSS for the purposes of branding until it is natively compatible with Bootstrap 4 (for CSS) and Angular 2 (for JS).

CSS Issue

Loading the PatternFly CSS has been a bit troublesome, as Webpack's LESS loader has a bug with respecting relative paths (the transpiled CSS is also not valid CSS), and a Sass file is not offered. Because the transpiled CSS is not valid CSS (it has LESS symbols), it is likely an npm build issue, so for now we will simply have to reference it via a CDN in one of our own Sass files. I have also looked at patternfly-sass to be able to at least use PatternFly's Sass files, however, npm is not installing it to the project properly as a GitHub repo with a trackable version using a tag, and, unfortunately, it is not available on npm.

I've been in touch with the PatternFly team regarding the inability to load CSS or LESS properly from the main patternfly npm package using Webpack (due to that bug with Webpack's less-loader here: webpack-contrib/less-loader#76). Please see relevant issues here: patternfly/patternfly#458, patternfly/patternfly-demo-app#10

We realize that we are on the bleeding edge here and will run into some challenges, but this will allow for easier maintainability into the near future, as contributors will not have to upgrade from one major version to the next. There are many moving components in terms of technology, so we want to keep up with the technologies that would result in the biggest changes when/if requiring an upgrade. In this case, that means Webpack 2, Angular 2, and Bootstrap 4.

Integrate PatternFly: JavaScript (#8)

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.