Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/map #2

Merged
merged 2 commits into from
Aug 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .DS_Store
Binary file not shown.
12 changes: 12 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# This should contain all files created during `npm run build`
# All files will be created in the image build process and won't needed to be copied to the docker image
node_modules
build

# Items that don't need to be in a Docker image.
# files related to docker build itself and additional files which not used in the app
.dockerignore
Dockerfile
Dockerfile.prod
README.md
.editorconfig
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Editor configuration, see https://editorconfig.org
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
max_line_length = off
trim_trailing_whitespace = false
quote_type = single
21 changes: 21 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Urls
REACT_APP_BASE_URL=https://www.anyway.co.il/
REACT_APP_REDIRECT_URL=/login-popup-redirect

REACT_APP_AUTH_URL=https://dev.anyway.co.il/

# === Behaviour ===
# Card tags for dev / staging
REACT_APP_SHOW_META_TAGS=true

# Default zoom
REACT_APP_DEFAULT_MAP_ZOOM=13

# Should demo card be visible
REACT_APP_SHOW_DEMO_CARDS=false

# Should only operation cards be displayed
REACT_APP_SHOW_ONLY_OPER_CARDS=false

# MOCK used for get mock information when we in dev mode
REACT_APP_SHOW_MOCK_INFORMATION=false
16 changes: 16 additions & 0 deletions .env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# override .env
# environment flags
REACT_APP_ENV=production

# Keys
REACT_APP_GOOGLE_MAP_KEY ='AIzaSyDUIWsBLkvIUwzLHMHos9qFebyJ63hEG2M'

# Behaviour
REACT_APP_SHOW_META_TAGS=false
REACT_APP_SHOW_DEMO_CARDS=false
REACT_APP_SHOW_ONLY_OPER_CARDS=true

# === Feature flags (use for hiding features until ready for production) ===
REACT_APP_LOGIN_READY_FOR_PROD=true
REACT_APP_LOCATION_SEARCH_READY_FOR_PROD=false
REACT_APP_LANGUAGE_READY_FOR_PROD=false
8 changes: 8 additions & 0 deletions .env.staging
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# override .env, .env.production
# environment flags
REACT_APP_ENV=staging

# Behaviour
REACT_APP_SHOW_META_TAGS=true
REACT_APP_SHOW_DEMO_CARDS=true
REACT_APP_SHOW_ONLY_OPER_CARDS=false
20 changes: 20 additions & 0 deletions .firebaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"targets": {
"anyway-newsflash-infographics": {
"hosting": {
"dev": [
"anyway-infographics-staging"
],
"demo": [
"anyway-infographics-demo"
],
"master": [
"anyway-infographics"
]
}
}
},
"projects": {
"default": "anyway-newsflash-infographics"
}
}
31 changes: 31 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: Bug report
about: Create a report to help us improve
title: "[Bug]"
labels: bug
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Environment**
Browser: Chrome / Safari / Firefox / etc.
Environment: Local / Staging / etc.

**Additional context**
Add any other context about the problem here.
13 changes: 13 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation-change.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
name: Documentation Change
about: 'Ask for a change relate to documentation '
title: "[Doc]"
labels: documentation
assignees: ''

---

please add Documentation for **[ ENTER DOC NAME HERE ]**

## Description
<!-- what the documentation should include -->
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: "[Feat]"
labels: enhancement
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/refactor-change.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: Refactor Change
about: Create a report to help us improve
title: "[Refactor]"
labels: ''
assignees: ''

---

<!-- please elaborate as much as possible on the refactor, and specify the steps -->
37 changes: 37 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: CI

on:
push:
branches-ignore:
- dev
- master

jobs:
build_and_preview:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run build:staging --if-present
- run: npm run lint
# todo: add unit tests

- name: Deploy
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_ANYWAY_NEWSFLASH_INFOGRAPHICS }}'
channelId: preview
projectId: anyway-newsflash-infographics
env:
FIREBASE_CLI_PREVIEWS: hostingchannels
CI: true
28 changes: 28 additions & 0 deletions .github/workflows/deploy-demo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: deploy-demo

on:
push:
branches:
- demo

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master
- name: Setup node
uses: actions/setup-node@master
with:
node-version: '16.x'
- name: Install Dependencies
run: npm install
- name: Build
run: npm run build:demo
- name: Deploy
uses: w9jds/firebase-action@master
with:
args: deploy --only hosting:demo
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
PROJECT_ID: anyway-newsflash-infographics
28 changes: 28 additions & 0 deletions .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: deploy-development

on:
push:
branches:
- dev

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master
- name: Setup node
uses: actions/setup-node@master
with:
node-version: '16.x'
- name: Install Dependencies
run: npm install
- name: Build
run: npm run build:staging
- name: Deploy
uses: w9jds/firebase-action@master
with:
args: deploy --only hosting:dev
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
PROJECT_ID: anyway-newsflash-infographics
28 changes: 28 additions & 0 deletions .github/workflows/deploy-master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: deploy-master

on:
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master
- name: Setup node
uses: actions/setup-node@master
with:
node-version: '16.x'
- name: Install Dependencies
run: npm install
- name: Build
run: npm run build
- name: Deploy
uses: w9jds/firebase-action@master
with:
args: deploy --only hosting:master
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
PROJECT_ID: anyway-newsflash-infographics
26 changes: 26 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.idea
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
.vscode
**/.dccache
7 changes: 7 additions & 0 deletions .prettierrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
singleQuote: true
arrowParens: always
trailingComma: all
printWidth: 120
bracketSpacing: true


13 changes: 13 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
addons: ['@storybook/addon-links', '@storybook/addon-essentials', '@storybook/preset-create-react-app'],
typescript: {
reactDocgen: 'react-docgen-typescript',
reactDocgenTypescriptOptions: {
compilerOptions: {
allowSyntheticDefaultImports: false,
esModuleInterop: false,
},
},
},
};
8 changes: 8 additions & 0 deletions .storybook/preview-head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<!-- Google alef font. see https://fonts.google.com/specimen/Alef -->
<link
href="https://fonts.googleapis.com/css2?family=Alef:wght@400;700&display=swap"
rel="stylesheet"
crossorigin="anonymous"
/>
<!-- Material icons. see: https://google.github.io/material-design-icons/ -->
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" crossorigin="anonymous" />
28 changes: 28 additions & 0 deletions .storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import React, { Suspense } from 'react';
import { Box, createStyles, makeStyles, createMuiTheme, ThemeProvider } from '@material-ui/core';
import OverlayLoader from '../src/components/molecules/OverlayLoader';
import { defaultThemeOptions } from '../src/style/theme';

const customTheme = createMuiTheme(defaultThemeOptions);
const useStyles = makeStyles(() =>
createStyles({
rtl: {
direction: 'rtl',
},
}),
);

function StoryApp(Story) {
const classes = useStyles();

return (
<Suspense fallback={<OverlayLoader show />}>
<ThemeProvider theme={customTheme}>
<Box className={classes.rtl}>
<Story />
</Box>
</ThemeProvider>
</Suspense>
);
}
export const decorators = [StoryApp];
Loading
Loading