diff --git a/.deployment b/.deployment new file mode 100644 index 0000000..7c8b899 --- /dev/null +++ b/.deployment @@ -0,0 +1,2 @@ +[config] +command = bash deploy.sh diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index 1f4efe3..0000000 --- a/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,31 +0,0 @@ -# React Boilerplate - -Before opening a new issue, please take a moment to review our [**community guidelines**](https://github.com/react-boilerplate/react-boilerplate/blob/master/CONTRIBUTING.md) to make the contribution process easy and effective for everyone involved. - -Please direct redux-saga related questions to stack overflow: -http://stackoverflow.com/questions/tagged/redux-saga - -For questions related to the boilerplate itself, you can also find answers on our gitter chat: -https://gitter.im/mxstbr/react-boilerplate - -**Before opening a new issue, you may find an answer in already closed issues**: -https://github.com/react-boilerplate/react-boilerplate/issues?q=is%3Aissue+is%3Aclosed - -## Issue Type - -- [ ] Bug (https://github.com/react-boilerplate/react-boilerplate/blob/master/CONTRIBUTING.md#bug-reports) -- [ ] Feature (https://github.com/react-boilerplate/react-boilerplate/blob/master/CONTRIBUTING.md#feature-requests) - -## Description - -(Add images if possible) - -## Steps to reproduce - -(Add link to a demo on https://jsfiddle.net or similar if possible) - -# Versions - -- React-Boilerplate (see `package.json`): -- Node/NPM: -- Browser: diff --git a/.github/MAINTAINERS.md b/.github/MAINTAINERS.md deleted file mode 100644 index 6553a18..0000000 --- a/.github/MAINTAINERS.md +++ /dev/null @@ -1,12 +0,0 @@ -# Maintainers - - mxstbr - - oliverturner - - justingreenberg - - gihrig - - sedubois - - chaintng - - samit4me - - amilajack - - Dattaya - - jwinn - - KarandikarMihir diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 268f544..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,23 +0,0 @@ -## React Boilerplate - -Thank you for contributing! Please take a moment to review our [**contributing guidelines**](https://github.com/react-boilerplate/react-boilerplate/blob/master/CONTRIBUTING.md) -to make the process easy and effective for everyone involved. - -**Please open an issue** before embarking on any significant pull request, especially those that -add a new library or change existing tests, otherwise you risk spending a lot of time working -on something that might not end up being merged into the project. - -Before opening a pull request, please ensure: - -- [ ] You have followed our [**contributing guidelines**](https://github.com/react-boilerplate/react-boilerplate/blob/master/CONTRIBUTING.md) -- [ ] double-check your branch is based on `dev` and targets `dev` -- [ ] Pull request has tests (we are going for 100% coverage!) -- [ ] Code is well-commented, linted and follows project conventions -- [ ] Documentation is updated (if necessary) -- [ ] Internal code generators and templates are updated (if necessary) -- [ ] Description explains the issue/use-case resolved and auto-closes related issues - -Be kind to code reviewers, please try to keep pull requests as small and focused as possible :) - -**IMPORTANT**: By submitting a patch, you agree to allow the project -owners to license your work under the terms of the [MIT License](https://github.com/react-boilerplate/react-boilerplate/blob/master/LICENSE.md). diff --git a/.nvmrc b/.nvmrc deleted file mode 100644 index 5debbed..0000000 --- a/.nvmrc +++ /dev/null @@ -1 +0,0 @@ -lts/carbon diff --git a/.travis.yml b/.travis.yml index efa83dd..8f635f5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,26 +1,17 @@ language: node_js node_js: - - 9 - - 8 + - "node" script: - - node ./internals/scripts/generate-templates-for-linting - npm test -- --maxWorkers=4 - - npm run build - -before_install: - - export CHROME_BIN=chromium-browser - - export DISPLAY=:99.0 - - sh -e /etc/init.d/xvfb start - -notifications: - email: - on_failure: change after_success: 'npm run coveralls' cache: - yarn: true directories: - - node_modules + - "$HOME/.npm" + +deploy: + provider: azure_web_apps + verbose: true diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md deleted file mode 100644 index 3664ac2..0000000 --- a/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,49 +0,0 @@ -# Contributor Code of Conduct - -As contributors and maintainers of this project, and in the interest of -fostering an open and welcoming community, we pledge to respect all people who -contribute through reporting issues, posting feature requests, updating -documentation, submitting pull requests or patches, and other activities. - -We are committed to making participation in this project a harassment-free -experience for everyone, regardless of level of experience, gender, gender -identity and expression, sexual orientation, disability, personal appearance, -body size, race, ethnicity, age, religion, or nationality. - -Examples of unacceptable behavior by participants include: - -- The use of sexualized language or imagery -- Personal attacks -- Trolling or insulting/derogatory comments -- Public or private harassment -- Publishing other's private information, such as physical or electronic - addresses, without explicit permission -- Other unethical or unprofessional conduct - -Project maintainers have the right and responsibility to remove, edit, or -reject comments, commits, code, wiki edits, issues, and other contributions -that are not aligned to this Code of Conduct, or to ban temporarily or -permanently any contributor for other behaviors that they deem inappropriate, -threatening, offensive, or harmful. - -By adopting this Code of Conduct, project maintainers commit themselves to -fairly and consistently applying these principles to every aspect of managing -this project. Project maintainers who do not follow or enforce the Code of -Conduct may be permanently removed from the project team. - -This Code of Conduct applies both within project spaces and in public spaces -when an individual is representing the project or its community. - -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported by contacting the project maintainer at contact@mxstbr.com. All -complaints will be reviewed and investigated and will result in a response that -is deemed necessary and appropriate to the circumstances. Maintainers are -obligated to maintain confidentiality with regard to the reporter of an -incident. - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], -version 1.3.0, available at -[http://contributor-covenant.org/version/1/3/0/][version] - -[homepage]: http://contributor-covenant.org -[version]: http://contributor-covenant.org/version/1/3/0/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index c16be4b..0000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,134 +0,0 @@ -# Contributing to react-boilerplate - -Love react-boilerplate and want to help? Thanks so much, there's something to do for everybody! - -Please take a moment to review this document in order to make the contribution process easy and effective for everyone involved. - -Following these guidelines helps to communicate that you respect the time of the developers managing and developing this open source project. In return, they should reciprocate that respect in addressing your issue or assessing patches and features. - -## Using the issue tracker - -The [issue tracker](https://github.com/react-boilerplate/react-boilerplate/issues) is -the preferred channel for [bug reports](#bugs), [features requests](#features) -and [submitting pull requests](#pull-requests). - - - -## Bug reports - -A bug is a _demonstrable problem_ that is caused by the code in the repository. -Good bug reports are extremely helpful - thank you! - -Guidelines for bug reports: - -1. **Use the GitHub issue search** — check if the issue has already been reported. - -2. **Check if the issue has been fixed** — try to reproduce it using the latest `master` or development branch in the repository. - -3. **Isolate the problem** — ideally create a [reduced test case](https://css-tricks.com/reduced-test-cases/) and a live example. - -A good bug report shouldn't leave others needing to chase you up for more information. Please try to be as detailed as possible in your report. What is your environment? What steps will reproduce the issue? What browser(s) and OS -experience the problem? What would you expect to be the outcome? All these details will help people to fix any potential bugs. - -Example: - -> Short and descriptive example bug report title -> -> A summary of the issue and the browser/OS environment in which it occurs. If -> suitable, include the steps required to reproduce the bug. -> -> 1. This is the first step -> 2. This is the second step -> 3. Further steps, etc. -> -> `` - a link to the reduced test case -> -> Any other information you want to share that is relevant to the issue being -> reported. This might include the lines of code that you have identified as -> causing the bug, and potential solutions (and your opinions on their -> merits). - - - -## Feature requests - -Feature requests are welcome. But take a moment to find out whether your idea fits with the scope and aims of the project. It's up to _you_ to make a strong case to convince the project's developers of the merits of this feature. Please provide as much detail and context as possible. - - - -## Pull requests - -Good pull requests - patches, improvements, new features - are a fantastic -help. They should remain focused in scope and avoid containing unrelated -commits. - -**Please ask first** before embarking on any significant pull request (e.g. -implementing features, refactoring code, porting to a different language), -otherwise you risk spending a lot of time working on something that the -project's developers might not want to merge into the project. - -Please adhere to the coding conventions used throughout a project (indentation, -accurate comments, etc.) and any other requirements (such as test coverage). - -Since the `master` branch is what people actually use in production, we have a -`dev` branch that unstable changes get merged into first. Only when we -consider that stable we merge it into the `master` branch and release the -changes for real. - -Adhering to the following process is the best way to get your work -included in the project: - -1. [Fork](https://help.github.com/articles/fork-a-repo/) the project, clone your fork, and configure the remotes: - - ```bash - # Clone your fork of the repo into the current directory - git clone https://github.com//react-boilerplate.git - # Navigate to the newly cloned directory - cd react-boilerplate - # Assign the original repo to a remote called "upstream" - git remote add upstream https://github.com/react-boilerplate/react-boilerplate.git - ``` - -2. If you cloned a while ago, get the latest changes from upstream: - - ```bash - git checkout dev - git pull upstream dev - ``` - -3. Create a new topic branch (off the `dev` branch) to contain your feature, change, or fix: - - ```bash - git checkout -b - ``` - -4. Commit your changes in logical chunks. Please adhere to these [git commit message guidelines](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) or your code is unlikely be merged into the main project. Use Git's [interactive rebase](https://help.github.com/articles/about-git-rebase/) feature to tidy up your commits before making them public. - -5. Locally merge (or rebase) the upstream dev branch into your topic branch: - - ```bash - git pull [--rebase] upstream dev - ``` - -6. Push your topic branch up to your fork: - - ```bash - git push origin - ``` - -7. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/) - with a clear title and description. - -**IMPORTANT**: By submitting a patch, you agree to allow the project -owners to license your work under the terms of the [MIT License](https://github.com/react-boilerplate/react-boilerplate/blob/master/LICENSE.md). - -# Collaborating guidelines - -You can find the list of all maintainers in [MAINTAINERS.md](./MAINTAINERS.md). - -There are few basic rules to ensure high quality of the boilerplate: - -- Before merging, a PR requires at least two approvals from the collaborators unless it's an architectural change, a large feature, etc. If it is, then at least 50% of the core team have to agree to merge it, with every team member having a full veto right. (i.e. every single one can block any PR) -- A PR should remain open for at least two days before merging (does not apply for trivial contributions like fixing a typo). This way everyone has enough time to look into it. - -You are always welcome to discuss and propose improvements to this guideline. diff --git a/Changelog.md b/Changelog.md deleted file mode 100644 index b503516..0000000 --- a/Changelog.md +++ /dev/null @@ -1,238 +0,0 @@ -# Changelog - -## 3.6 June 2018 - -## News - -Major version updates are finally here! It's been awhile, but we're a small team that's been pushing this for awhile. Thanks to several users' PRs, we were able to cherry-pick a lot from the dev branch to push this release out. We decided because of the amount of dependencies that needed to be updated- we would overshoot some of the changes made on the dev branch and just grab the most pressing ones. - -Next steps for us will be revisiting the dev branch, revisiting outstanding PRs and RFCs (like Immutable), and also plugging away at a create-react-app spinoff for react-boilerplate. - -### Main - -- **Upgrade Webpack to v4** (@julienben @stern-shawn) - - Syntax / function changes (mode, optimization, etc.) - - Remove webpack loader syntax from main app - - Better SVG handling -- **Upgrade Redux to v4** (@gretzky) -- **Upgrade React to v16** (@blling @gretzky) -- **Upgrade Enzyme to v3** (@blling @gretzky) - - Add in new Adapter, as required - - Minor Jest config tweaks to include new Enzyme setup config -- **Upgrade styled-components to v3** (@julienben) - - Reconfigure Jest snapshot testing for styled-components (@gretzky) -- **Added support for node v9, v8** (@julienben) - - Removed support for node v6 -- **Add Prettier** (@julienben) -- **Upgrade ESLint to v4** (@julienben) -- **Add stylelint and stylelint config** (@julienben) - -### Other Updates - -- Add `--fix` flag to eslint command (@shobhitchittora) -- Correct babel plugin order (@petrhanak) -- Add missing `import PropTypes` to component generators (@GoldAnna) -- Remove unnecessary `onRejected()` from FontFaceObserver (@akarve) -- Include "Setting Up Your Editor" in documentation (@mjbvz) -- Add login / authentication flow example into documentation (@tinavanschelt) -- More detailed redux-saga usage documentation (@acharlop) -- Fix ejection error of done sagas (@outdooricon) - -## 3.5 September 2017 - -### News - -So, a few things have changed in the JS ecosystem since the original release of React Boilerplate, and there was a discussion in #1776 around the it's future. TLDR; we had two incompatible PRs — one for server-side rendering, and another for react-router v4. The community decided that we would keep our dependencies up to date (upgrade react-router) and establish a clear mission for React Boilerplate: - -**React Boilerplate is a rock-solid foundation for crafting large, high-performance enterprise-grade frontend web applications that have advanced/custom requirements.** - -- Static output designed for CDN and edge caches -- Extreme Developer Ergonomics - - Parallelized Tests - - DLL manifest in development for blazing rebuilds - - Scaffolding tools -- Pre-baked i18n support -- Low level tooling that gives developer complete control - -We may include SSR in a future version, but for now this is our focus... create-react-app and next.js are doing an awesome job and strongly recommend these projects for most use cases. - -### Breaking - -- **Upgrade React Router to v4.x.x** (@anuraaga, @Dattaya, et al) - - Use React-Loadable for data lifecycle management - - Refactor `asyncInjectors`: improve code splitting/saga management - - For a complete overview of changes, please see #1746 - -### Main - -- **Upgrade React to v15.6** (@g0ddish) -- **Upgrade Webpack and related dependencies to v3.x.x** (@KarandikarMihir) -- **Upgrade `styled-components` to v2.x.x** (@justingreenberg) -- Replace `babel-preset-hmre` with vanilla Webpack HMR (@Dattaya) -- Serve Dlls via `add-asset-html-webpack-plugin` (@skidding) -- Migrate from `React.PropTypes` to `prop-types` (@dennybiasioll - -### Other Updates - -- Add Stateless Functions to Container generator (@outdooricon) -- Change development sourcemap style (@samit4me) -- Create new documentation for dependency updates (@gihrig) -- Downgrade `sanitize.css` (@Dattaya) -- Enable rule `react/no-array-index-key` (@carloscuatin) -- Fix `Intl` polyfill in language generator (@tmf) -- Handle 204 and 205 HTTP response (@williamdclt) -- Icon updates and improvements (@samit4me) -- Import only necessary components for RRv4 (@sorin-davidoi) -- Improve `` component tests (@chaintng) -- Improve component tests in demo (@dennybiasiolli) -- Improve setup to recognize repo before clearing git (@Aftabnack) -- Make build output less verbose (@KarandikarMihir) -- Move `onSubmitForm` test into `mapDispatchToProps` test (@tomasfrancisco) -- NPM script and dependency updates, many fixes (@gihrig) -- Remove state update in componentWillUpdate (@mawi12345) -- Remove unused Sinon dependency (@avdeev) -- Remove route names from `app/routes` (@beardedtim) -- Rename `store.js` to `configureStore.js` to prevent conflict (@howardya) -- Separate `dev` and `prod` middleware (@tomazy) -- Sort ESLint config in `package.json` (@bt) -- Support OpenType fonts with `.otf` file extension (@kachkaev) -- Turn `App` into a functional component (@Dattaya) -- Update FAQ for styles getting overridden (@samit4me) -- Update the 'tagged template literals' link (@joncass) -- Use camelcase for reducer and saga key to match selector (@anuraaga) -- Use correct selector names in tests (@Dattaya) -- Use local instance of `shelljs` (@KarandikarMihir) -- Use optimized version of the RBP banner (@tomazy) -- Use relative path for `manifest.json` (@mrharel) - -Many fixes to documentation thanks to @Aftabnack, @auchenberg, @danielrob, @gregoralbrecht, @JonathanMerklin, @marciopuga, @NicholasAnthony, @Skaronator, and @vedatmahir - -## 3.4 January 2017 - -### Main - -- **Switch to Jest for testing**, massive thanks to @dmitriiabramov -- **Update to webpack 2 RC** (includes switching from `System.import` to `import()`), thanks to @Dattaya -- **Add progress bar while loading code splitted routes**, thanks to @KarandikarMihir -- **Add the "Hitchhikers Guide to `react-boilerplate` to the docs**, massive thanks to @KarandikarMihir -- Update all dependencies, as always huge thanks to @gihrig, our master of dependencies -- Enable `import/first` eslint rule and rewrite all imports, huge thanks to @KarandikarMihir -- Add Node v7 support and deprecate v4 support, thanks to @samit4me @MariusRumpf -- Prevent i18n language duplication, thanks to @harijoe -- Add the webpack circular dependency plugin to avoid hard to debug errors, thanks to @haikyuu -- Refactor all selectors and generators with new naming convention, thanks to @Dattaya -- Update generator templates, thanks to @Virsaviya @jeremyadavis -- Add support for the `--host` parameter when running `npm start`, thanks to @ifedotov -- Showcase reselects `createStructuredSelector` in the example, thanks to @Dattaya -- Exclude test files from coverage report, thanks to @samit4me -- Lint the templates for the generators, thanks to @Dattaya -- Huge improvement to DX testing a freshly cleaned project, thanks to @outdooricon - -### Other Updates - -- **Remove the webpack DedupePlugin** as it leads to errors in production and is now included by default, thanks to @samit4me -- Remove the `npm run pagespeed` command and all related dependencies and files, thanks to @mkhazov -- Trigger a full page reload when HMR fails, thanks @kachkaev -- Don't import all of lodash, thanks to @jwinn -- Improve `.editconfig`, thanks to @avdeev -- Improve the example components, thanks to @tomazy -- Fix `npm run clean` not working as expected, thanks to @adjnor -- Fix the i18n button not updating with new state, thanks to @adjnor -- Fix console error when changing language, thanks to @samit4me -- Fix default polyfill language, thanks to @web2style -- Fix language generation, thanks to @chaintng -- Switch to new webpack query syntax, thanks to @shrynx -- Add an Introductory document to help people get started, thanks to @KarandikarMihir -- Add security configuration recommendations for Nginx (`.nginx.conf`), thanks to @supergicko -- Add and fix lots to stuff in the documentation, thanks to @pavlin-policar, @samit4me @outdooricon @PierrickGT @nndung179 @outdooricon @kelsonic @jimmyheaddon -- A wide variety of small fixes, thanks to @Dattaya @gihrig @outdooricon - -### News - -Welcome @KarandikarMihir to the team! Karandikar has been all over the repo, providing fixes and features. Happy to have him on board to make `react-boilerplate` even better! - -Special thanks as always to @gihrig for diligently testing everything and keeping our dependencies up to date! - -Also, huge props to @samit4me and @Dattaya for being everywhere and fixing so many issues and of course to @KarandikarMihir for all his hard work. - -If you want to help us make react-boilerplate great, please use the `dev` branch, test all the things and report all the bugs! - -### Supporters - -This release was made possible by [Fullstack React](https://www.fullstackreact.com/) and [Serverless](http://serverless.com)! _Want to support us too? [Click here!](http://opencollective.com/react-boilerplate)_ - -## RBP v3.0: The "JS Fatigue Antivenin" Edition - -React Boilerplate (RBP) v3.0.0 is out, and it's a _complete_ rewrite! :tada: - -We've focused on becoming a rock-solid foundation to start your next project -with, no matter what its scale. You get to focus on writing your app because we -focus on making that as easy as pie. - -website! - -## Highlights - -- **Scaffolding**: Thanks to @somus, you can now run `npm run generate` in your - terminal and immediately create new components, containers, sagas, routes and - selectors! No more context switching, no more "Create new file, copy and paste - that boilerplate structure, bla bla": just `npm run generate ` and go. - - Oh... and starting a project got a whole lot easier too: `npm run setup`. Done. - -- **Revamped architecture**: Following the incredible discussion in #27 (thanks - everybody for sharing your thoughts), we now have a weapons-grade, domain-driven - application architecture. - - "Smart" containers are now isolated from stateless and/or generic components, - tests are now co-located with the code that they validate. - -- **New industry-standard JS utilities** We're now making the most of... - - - ImmutableJS - - reselect - - react-router-redux - - redux-saga - -- **Huge CSS Improvements** - - - _[CSS Modules](docs/css/css-modules.md)_: Finally, truly modular, reusable - styles! - - _Page-specific CSS_: smart Webpack configuration means that only the CSS - your components need is served - - _Standards rock:_ Nothing beats consistent styling so we beefed up the - quality checks with **[stylelint](docs/css/stylelint.md)** to help ensure - that you and your team stay on point. - -- **Performance** - - - _Code splitting_: splitting/chunking by route means the leanest, meanest - payload (because the fastest code is the code you don't load!) - -- **Testing setup**: Thanks to @jbinto's herculean efforts, testing is now a - first-class citizen of this boilerplate. (the example app has _99% test coverage!_) - Karma and enzyme take care of unit testing, while ngrok tunnels your local - server for access from anywhere in the world – perfect for testing on different - devices in different locations. - -- **New server setup**: Thanks to the mighty @grabbou, we now use express.js to - give users a production-ready server right out of the box. Hot reloading is - still as available as always, but adding a custom API or a non-React page to - your application is now easier than ever :smile: - -- **Cleaner layout:** We've taken no prisoners with our approach to keeping your - code the star of the show: wherever possible, the new file layout keeps the - config in the background so that you can keep your focus where it needs to be. - -- **Documentation**: Thanks to @oliverturner, this boilerplate has some of the best - documentation going. Not just clearly explained usage guides, but easy-to-follow - _removal_ guides for most features too. RBP is just a launchpad: don't want to - use a bundled feature? Get rid of it quickly and easily without having to dig - through the code. - -- **Countless small improvements**: Everything, from linting pre-commit (thanks - @okonet!) to code splitting to cross-OS compatibility is now tested and ready - to go: - - - We finally added a **[CoC](CODE_OF_CONDUCT.md)** - - Windows compatibility has improved massively diff --git a/LICENSE.md b/LICENSE.md deleted file mode 100644 index 68cd425..0000000 --- a/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2018 Maximilian Stoiber - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/README.md b/README.md index e4b1113..9ee4807 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,7 @@ -# Github Issues Showcase Project -It's an SPA for viewing issues from the selected repository on Github. -## Fulfilled requirements: -1. Searching issues by user and repository name. The input field for repository name should have autocomplete. Each issue should display with number, name and open date. Need an opportunity to share a search result page. -2. Paging for issues -3. Showing messages: "loading issues", "issues not be found", "issues not be loaded" etc. -5. Viewing an issue on the different page -6. Tests for components / reducers / action creators +# Github Issues Showcase Project · [![Build Status](https://travis-ci.org/SparkCode/github_issues.svg?branch=master)](https://travis-ci.org/SparkCode/github_issues) + +Project requirements and results are shown [here](https://docs.google.com/document/d/1L-NnGejRccR9VsdCj1EIx12yMtPcJ3PwWATbIXRWYBg) [in Russian] + ## Available Scripts In the project directory, you can run: @@ -26,3 +22,7 @@ Launches the test runner in the interactive watch mode.
Builds the app for production to the `build` folder. It correctly bundles React in production mode and optimizes the build for the best performance. + +### `npm run analyze` + +Builds the app for production to the `build` folder, generates a set of stats showing bundle in `stats.json` and loads Webpack Bundle Analyzer page that shows a visualization of the contents of all bundles. diff --git a/app/.htaccess b/app/.htaccess deleted file mode 100644 index 40252ae..0000000 --- a/app/.htaccess +++ /dev/null @@ -1,52 +0,0 @@ - - - - ####################################################################### - # GENERAL # - ####################################################################### - - # Make apache follow sym links to files - Options +FollowSymLinks - # If somebody opens a folder, hide all files from the resulting folder list - IndexIgnore */* - - - ####################################################################### - # REWRITING # - ####################################################################### - - # Enable rewriting - RewriteEngine On - - # If its not HTTPS - RewriteCond %{HTTPS} off - - # Comment out the RewriteCond above, and uncomment the RewriteCond below if you're using a load balancer (e.g. CloudFlare) for SSL - # RewriteCond %{HTTP:X-Forwarded-Proto} !https - - # Redirect to the same URL with https://, ignoring all further rules if this one is in effect - RewriteRule ^(.*) https://%{HTTP_HOST}/$1 [R,L] - - # If we get to here, it means we are on https:// - - # If the file with the specified name in the browser doesn't exist - RewriteCond %{REQUEST_FILENAME} !-f - - # and the directory with the specified name in the browser doesn't exist - RewriteCond %{REQUEST_FILENAME} !-d - - # and we are not opening the root already (otherwise we get a redirect loop) - RewriteCond %{REQUEST_FILENAME} !\/$ - - # Rewrite all requests to the root - RewriteRule ^(.*) / - - - - - # Do not cache sw.js, required for offline-first updates. - - Header set Cache-Control "private, no-cache, no-store, proxy-revalidate, no-transform" - Header set Pragma "no-cache" - - diff --git a/app/.nginx.conf b/app/.nginx.conf deleted file mode 100644 index 6a71831..0000000 --- a/app/.nginx.conf +++ /dev/null @@ -1,112 +0,0 @@ -## -# Put this file in /etc/nginx/conf.d folder and make sure -# you have a line 'include /etc/nginx/conf.d/*.conf;' -# in your main nginx configuration file -## - -## -# Redirect to the same URL with https:// -## - -server { - - listen 80; - -# Type your domain name below - server_name example.com; - - return 301 https://$server_name$request_uri; - -} - -## -# HTTPS configurations -## - -server { - - listen 443 ssl; - -# Type your domain name below - server_name example.com; - -# Configure the Certificate and Key you got from your CA (e.g. Lets Encrypt) - ssl_certificate /path/to/certificate.crt; - ssl_certificate_key /path/to/server.key; - - ssl_session_timeout 1d; - ssl_session_cache shared:SSL:50m; - ssl_session_tickets off; - -# Only use TLS v1.2 as Transport Security Protocol - ssl_protocols TLSv1.2; - -# Only use ciphersuites that are considered modern and secure by Mozilla - ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256'; - -# Do not let attackers downgrade the ciphersuites in Client Hello -# Always use server-side offered ciphersuites - ssl_prefer_server_ciphers on; - -# HSTS (ngx_http_headers_module is required) (15768000 seconds = 6 months) - add_header Strict-Transport-Security max-age=15768000; - -# Diffie-Hellman parameter for DHE ciphersuites, recommended 2048 bits -# Uncomment if you want to use your own Diffie-Hellman parameter, which can be generated with: openssl ecparam -genkey -out dhparam.pem -name prime256v1 -# See https://wiki.mozilla.org/Security/Server_Side_TLS#DHE_handshake_and_dhparam -# ssl_dhparam /path/to/dhparam.pem; - - -## OCSP Configuration START -# If you want to provide OCSP Stapling, you can uncomment the following lines -# See https://www.digitalocean.com/community/tutorials/how-to-configure-ocsp-stapling-on-apache-and-nginx for more infos about OCSP and its use case -# fetch OCSP records from URL in ssl_certificate and cache them - -#ssl_stapling on; -#ssl_stapling_verify on; - -# verify chain of trust of OCSP response using Root CA and Intermediate certs (you will get this file from your CA) -#ssl_trusted_certificate /path/to/root_CA_cert_plus_intermediates; - -## OCSP Configuration END - -# To let nginx use its own DNS Resolver -# resolver ; - - -# Always serve index.html for any request - location / { - # Set path - root /var/www/; - try_files $uri /index.html; - } - -# Do not cache sw.js, required for offline-first updates. - location /sw.js { - add_header Cache-Control "no-cache"; - proxy_cache_bypass $http_pragma; - proxy_cache_revalidate on; - expires off; - access_log off; - } - -## -# If you want to use Node/Rails/etc. API server -# on the same port (443) config Nginx as a reverse proxy. -# For security reasons use a firewall like ufw in Ubuntu -# and deny port 3000/tcp. -## - -# location /api/ { -# -# proxy_pass http://localhost:3000; -# proxy_http_version 1.1; -# proxy_set_header X-Forwarded-Proto https; -# proxy_set_header Upgrade $http_upgrade; -# proxy_set_header Connection 'upgrade'; -# proxy_set_header Host $host; -# proxy_cache_bypass $http_upgrade; -# -# } - -} diff --git a/app/app.js b/app/app.js index 92532bd..23a08c0 100644 --- a/app/app.js +++ b/app/app.js @@ -19,10 +19,9 @@ import 'sanitize.css/sanitize.css'; import App from 'containers/App'; import './stylesheets/main.scss'; -// Load the favicon and the .htaccess file +// Load the favicon /* eslint-disable import/no-unresolved, import/extensions, import/first */ import '!file-loader?name=[name].[ext]!./images/favicon.ico'; -import 'file-loader?name=[name].[ext]!./.htaccess'; /* eslint-enable import/no-unresolved, import/extensions, import/first */ import configureStore from './configureStore'; diff --git a/app/components/Autocomplete/Autocomplete.js b/app/components/Autocomplete/Autocomplete.js index cfbb6b0..3b1c2db 100644 --- a/app/components/Autocomplete/Autocomplete.js +++ b/app/components/Autocomplete/Autocomplete.js @@ -7,8 +7,10 @@ import Input from 'components/Input'; import './Autocomplete.scss'; import OptionsList from './OptionsList'; +const NOTHING_SELECTED = -1; + class AutoComplete extends PureComponent { - defaultState = { focusedOptionIndex: -1, isInputHasFocus: false }; + defaultState = { focusedOptionIndex: NOTHING_SELECTED, isInputHasFocus: false }; constructor(props) { super(props); @@ -40,13 +42,13 @@ class AutoComplete extends PureComponent { }; onOptionsListHoverOut = () => { - this.setState({ focusedOptionIndex: -1, isControlledByMouse: false }); + this.setState({ focusedOptionIndex: NOTHING_SELECTED, isControlledByMouse: false }); }; focusNextOption = (step, focusedOptionIndex, optionsCount) => { let newIndex = focusedOptionIndex + step; if (newIndex >= optionsCount) { - newIndex = -1; + newIndex = NOTHING_SELECTED; } else if (newIndex < -1) { newIndex = optionsCount - 1; } @@ -58,7 +60,7 @@ class AutoComplete extends PureComponent { switch (e.keyCode) { case KeyCodes.enter: { const { focusedOptionIndex } = this.state; - if (focusedOptionIndex !== -1) { + if (focusedOptionIndex !== NOTHING_SELECTED) { const { options } = this.props; this.onOptionSelect(options[focusedOptionIndex]); this.inputElement.blur(); @@ -70,7 +72,7 @@ class AutoComplete extends PureComponent { e.preventDefault(); this.setState((prevState, props) => { const { focusedOptionIndex } = prevState; - return this.focusNextOption(-1, focusedOptionIndex, props.options.length); + return this.focusNextOption(NOTHING_SELECTED, focusedOptionIndex, props.options.length); }); break; } @@ -90,7 +92,7 @@ class AutoComplete extends PureComponent { onInputValueChange = value => { const { onValueChange } = this.props; - this.setState({ focusedOptionIndex: -1 }); + this.setState({ focusedOptionIndex: NOTHING_SELECTED }); onValueChange(value); }; diff --git a/app/components/Autocomplete/OptionsList.scss b/app/components/Autocomplete/OptionsList.scss index 60eec02..31fec16 100644 --- a/app/components/Autocomplete/OptionsList.scss +++ b/app/components/Autocomplete/OptionsList.scss @@ -1,16 +1,21 @@ @import "stylesheets/abstracts/variables"; +@import "stylesheets/abstracts/mixins"; .autocomplete-options { padding-left: 0; background-color: $seashell; - color: $grey; + color: $shuttle-gray; margin: 1px 0 0; position: absolute; - max-height: 400px; + max-height: 200px; overflow-y:auto; left: 0; right: 0; &_unseen { display: none; } + + @include respond-to("small") { + max-height: 400px; + } } diff --git a/app/components/Autocomplete/Autocomplete.spec.js b/app/components/Autocomplete/tests/Autocomplete.spec.js similarity index 96% rename from app/components/Autocomplete/Autocomplete.spec.js rename to app/components/Autocomplete/tests/Autocomplete.spec.js index 95cd193..ee733cb 100644 --- a/app/components/Autocomplete/Autocomplete.spec.js +++ b/app/components/Autocomplete/tests/Autocomplete.spec.js @@ -1,8 +1,8 @@ import sinon from 'sinon'; import { componentSetup } from 'utils/componentTestingSetup'; import KeyCodes from 'utils/keyCodes'; -import Autocomplete from './Autocomplete'; -import OptionsList from './OptionsList'; +import Autocomplete from '../Autocomplete'; +import OptionsList from '../OptionsList'; describe('', () => { const defaultProps = { diff --git a/app/components/Autocomplete/Option.spec.js b/app/components/Autocomplete/tests/Option.spec.js similarity index 97% rename from app/components/Autocomplete/Option.spec.js rename to app/components/Autocomplete/tests/Option.spec.js index 560cb52..af6203f 100644 --- a/app/components/Autocomplete/Option.spec.js +++ b/app/components/Autocomplete/tests/Option.spec.js @@ -1,6 +1,6 @@ import sinon from 'sinon'; import { componentSetup } from 'utils/componentTestingSetup'; -import Option from './Option'; +import Option from '../Option'; describe('