Skip to content

Commit 6317467

Browse files
authored
Fixed: Responsiveness for mobile devices w.r.t to side navigation (#161)
* FIxed: Sidebar was not responsive for mobile view Angular 12 migration UI design changes * Fixed Unit tese cases
1 parent 284d3c8 commit 6317467

33 files changed

+284
-452
lines changed

.browserslistrc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
2+
# For additional information regarding the format and rule options, please see:
3+
# https://github.com/browserslist/browserslist#queries
4+
5+
# For the full list of supported browsers by the Angular framework, please see:
6+
# https://angular.io/guide/browser-support
7+
8+
# You can see what browsers were selected by your queries by running:
9+
# npx browserslist
10+
11+
last 1 Chrome version
12+
last 1 Firefox version
13+
last 2 Edge major versions
14+
last 2 Safari major versions
15+
last 2 iOS major versions
16+
Firefox ESR
17+
not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.

angular.json

Lines changed: 36 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
"projects": {
66
"angular-builders": {
77
"projectType": "application",
8-
"schematics": {},
8+
"schematics": {
9+
"@schematics/angular:application": {
10+
"strict": true
11+
}
12+
},
913
"root": "",
1014
"sourceRoot": "src",
1115
"prefix": "app",
@@ -18,7 +22,6 @@
1822
"main": "src/main.ts",
1923
"polyfills": "src/polyfills.ts",
2024
"tsConfig": "tsconfig.app.json",
21-
"aot": true,
2225
"assets": [
2326
"src/favicon.ico",
2427
"src/assets",
@@ -29,49 +32,54 @@
2932
"./node_modules/@angular/material/prebuilt-themes/indigo-pink.css",
3033
"src/styles.css"
3134
],
32-
"scripts": []
35+
"scripts": [],
36+
"serviceWorker": true,
37+
"ngswConfigPath": "ngsw-config.json"
3338
},
3439
"configurations": {
3540
"production": {
36-
"fileReplacements": [
37-
{
38-
"replace": "src/environments/environment.ts",
39-
"with": "src/environments/environment.prod.ts"
40-
}
41-
],
42-
"optimization": true,
43-
"outputHashing": "all",
44-
"sourceMap": false,
45-
"namedChunks": false,
46-
"extractLicenses": true,
47-
"vendorChunk": false,
48-
"buildOptimizer": true,
4941
"budgets": [
5042
{
5143
"type": "initial",
52-
"maximumWarning": "2mb",
53-
"maximumError": "5mb"
44+
"maximumWarning": "500kb",
45+
"maximumError": "1mb"
5446
},
5547
{
5648
"type": "anyComponentStyle",
57-
"maximumWarning": "6kb"
49+
"maximumWarning": "2kb",
50+
"maximumError": "4kb"
5851
}
5952
],
60-
"serviceWorker": true,
61-
"ngswConfigPath": "ngsw-config.json"
53+
"fileReplacements": [
54+
{
55+
"replace": "src/environments/environment.ts",
56+
"with": "src/environments/environment.prod.ts"
57+
}
58+
],
59+
"outputHashing": "all"
60+
},
61+
"development": {
62+
"buildOptimizer": false,
63+
"optimization": false,
64+
"vendorChunk": true,
65+
"extractLicenses": false,
66+
"sourceMap": true,
67+
"namedChunks": true
6268
}
63-
}
69+
},
70+
"defaultConfiguration": "production"
6471
},
6572
"serve": {
6673
"builder": "@angular-devkit/build-angular:dev-server",
67-
"options": {
68-
"browserTarget": "angular-builders:build"
69-
},
7074
"configurations": {
7175
"production": {
7276
"browserTarget": "angular-builders:build:production"
77+
},
78+
"development": {
79+
"browserTarget": "angular-builders:build:development"
7380
}
74-
}
81+
},
82+
"defaultConfiguration": "development"
7583
},
7684
"extract-i18n": {
7785
"builder": "@angular-devkit/build-angular:extract-i18n",
@@ -97,37 +105,9 @@
97105
],
98106
"scripts": []
99107
}
100-
},
101-
"lint": {
102-
"builder": "@angular-devkit/build-angular:tslint",
103-
"options": {
104-
"tsConfig": [
105-
"tsconfig.app.json",
106-
"tsconfig.spec.json",
107-
"e2e/tsconfig.json"
108-
],
109-
"exclude": [
110-
"**/node_modules/**"
111-
]
112-
}
113-
},
114-
"e2e": {
115-
"builder": "@angular-devkit/build-angular:protractor",
116-
"options": {
117-
"protractorConfig": "e2e/protractor.conf.js",
118-
"devServerTarget": "angular-builders:serve"
119-
},
120-
"configurations": {
121-
"production": {
122-
"devServerTarget": "angular-builders:serve:production"
123-
}
124-
}
125108
}
126109
}
127110
}
128111
},
129-
"defaultProject": "angular-builders",
130-
"cli": {
131-
"analytics": "02413cf1-b5b8-42b1-8c01-5a81a3a99231"
132-
}
133-
}
112+
"defaultProject": "angular-builders"
113+
}

e2e/protractor.conf.js

Lines changed: 0 additions & 32 deletions
This file was deleted.

e2e/src/app.e2e-spec.ts

Lines changed: 0 additions & 23 deletions
This file was deleted.

e2e/src/app.po.ts

Lines changed: 0 additions & 11 deletions
This file was deleted.

e2e/tsconfig.json

Lines changed: 0 additions & 13 deletions
This file was deleted.

package.json

Lines changed: 28 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -5,49 +5,43 @@
55
"ng": "ng",
66
"start": "ng serve",
77
"build": "ng build",
8+
"watch": "ng build --watch --configuration development",
89
"test": "ng test",
9-
"lint": "ng lint",
10-
"e2e": "ng e2e",
1110
"contributors:add": "all-contributors add",
1211
"contributors:check": "all-contributors check"
1312
},
1413
"private": true,
1514
"dependencies": {
16-
"@angular/animations": "11.0.9",
17-
"@angular/cdk": "11.1.0",
18-
"@angular/common": "11.0.9",
19-
"@angular/compiler": "11.0.9",
20-
"@angular/core": "11.0.9",
21-
"@angular/forms": "11.0.9",
22-
"@angular/material": "11.1.0",
23-
"@angular/platform-browser": "11.0.9",
24-
"@angular/platform-browser-dynamic": "11.0.9",
25-
"@angular/router": "11.0.9",
26-
"@angular/service-worker": "11.0.9",
27-
"rxjs": "6.6.3",
28-
"tslib": "2.1.0",
29-
"zone.js": "0.10.3"
15+
"@angular/animations": "~12.0.0",
16+
"@angular/cdk": "^12.0.2",
17+
"@angular/common": "~12.0.0",
18+
"@angular/compiler": "~12.0.0",
19+
"@angular/core": "~12.0.0",
20+
"@angular/forms": "~12.0.0",
21+
"@angular/material": "^12.0.2",
22+
"@angular/platform-browser": "~12.0.0",
23+
"@angular/platform-browser-dynamic": "~12.0.0",
24+
"@angular/router": "~12.0.0",
25+
"@angular/service-worker": "~12.0.0",
26+
"rxjs": "~6.6.0",
27+
"tslib": "^2.1.0",
28+
"zone.js": "~0.11.4"
3029
},
3130
"devDependencies": {
32-
"@angular-devkit/build-angular": "0.1101.1",
33-
"@angular/cli": "11.1.1",
34-
"@angular/compiler-cli": "11.0.9",
35-
"@angular/language-service": "11.0.9",
36-
"@types/jasmine": "3.6.3",
37-
"@types/jasminewd2": "2.0.8",
38-
"@types/node": "12.12.54",
31+
"@angular-devkit/build-angular": "~12.0.0",
32+
"@angular/cli": "~12.0.0",
33+
"@angular/compiler-cli": "~12.0.0",
34+
"@types/jasmine": "~3.6.0",
35+
"@types/node": "^12.11.1",
3936
"all-contributors-cli": "6.17.0",
40-
"codelyzer": "6.0.1",
41-
"jasmine-core": "3.6.0",
42-
"jasmine-spec-reporter": "5.0.2",
43-
"karma": "5.0.9",
44-
"karma-chrome-launcher": "3.1.0",
37+
"jasmine-core": "~3.7.0",
38+
"karma": "~6.3.0",
39+
"karma-chrome-launcher": "~3.1.0",
40+
"karma-coverage": "~2.0.3",
41+
"karma-jasmine": "~4.0.0",
42+
"karma-jasmine-html-reporter": "^1.5.0",
4543
"karma-coverage-istanbul-reporter": "3.0.3",
46-
"karma-jasmine": "4.0.1",
47-
"karma-jasmine-html-reporter": "1.5.4",
48-
"protractor": "7.0.0",
49-
"ts-node": "8.10.2",
50-
"tslint": "6.1.3",
51-
"typescript": "4.0.5"
44+
"jasmine-spec-reporter": "7.0.0",
45+
"typescript": "~4.2.3"
5246
}
5347
}

src/app/Utils/components/search-bar/search-bar.component.css

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ input {
66
input[type=search] {
77
-webkit-appearance: textfield;
88
font-family: Roboto,"Helvetica Neue",sans-serif;
9-
font-size: 18px;
9+
font-size: 16px;
1010
}
1111
input::-webkit-search-decoration,
1212
input::-webkit-search-cancel-button {
@@ -15,14 +15,15 @@ input::-webkit-search-cancel-button {
1515

1616

1717
input[type=search] {
18-
background: #ededed url('../../../../assets/icons/search-1x.png') no-repeat 9px center;
18+
background: #ededed url('../../../../assets/icons/search-1x.png') no-repeat;
19+
background-position: right 10px top 8px;
1920
border: solid 1px #ccc;
2021
padding: 9px 10px 9px 32px;
2122
width: 85px;
2223

23-
-webkit-border-radius: 10em;
24-
-moz-border-radius: 10em;
25-
border-radius: 10em;
24+
-webkit-border-radius: 8em;
25+
-moz-border-radius: 8em;
26+
border-radius: 8em;
2627

2728
-webkit-transition: all .5s;
2829
-moz-transition: all .5s;
@@ -42,25 +43,20 @@ input[type=search] {
4243
}
4344

4445
#expand-search input[type=search] {
45-
width: 40px;
46-
height: 40px;
46+
width: 180px;
47+
height: 34px;
4748
padding-left: 10px;
4849
color: transparent;
4950
cursor: pointer;
51+
font-size: 16px;
5052
}
53+
5154
#expand-search input[type=search]:hover {
5255
background-color: #fff;
5356
}
5457
#expand-search input[type=search]:focus {
55-
width: 230px;
56-
padding-left: 32px;
5758
color: #000;
5859
background-color: #fff;
5960
cursor: auto;
61+
6062
}
61-
#expand-search input:-moz-placeholder {
62-
color: transparent;
63-
}
64-
#expand-search input::-webkit-input-placeholder {
65-
color: transparent;
66-
}

0 commit comments

Comments
 (0)