Skip to content
This repository has been archived by the owner on Aug 26, 2021. It is now read-only.

Rever main nav active item to a link #553

Merged
merged 38 commits into from Nov 20, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
6828362
Switched deployment manifests to nginx_buildpack
adamzerella Oct 25, 2018
9145e67
Bumped node version
adamzerella Oct 25, 2018
49efd09
Hotfix testing deploy-staging path
adamzerella Oct 25, 2018
ee3959b
Added missing cd path
adamzerella Oct 25, 2018
2f80d26
Removed invalid cd dir
adamzerella Oct 25, 2018
378dbb7
Correct deploy nginx path
adamzerella Oct 25, 2018
08561da
Corrected and tested cp -r command
adamzerella Oct 25, 2018
6613f54
Refactored nginx naming convention
adamzerella Oct 25, 2018
34d8f7b
Corrected CF manifest path
adamzerella Oct 25, 2018
716364a
Corrected prod deployment
adamzerella Oct 25, 2018
322b68f
Revert main nav active item to link
sukhrajghuman Oct 31, 2018
b8395b9
Restored comma, my bad!
sukhrajghuman Oct 31, 2018
8b113ba
Merge pull request #545 from govau/feature/revert-main-nav-active-ite…
sukhrajghuman Nov 15, 2018
eaecf36
Update au-footer__end
sukhrajghuman Oct 17, 2018
1e75bc1
Changed section to div
sukhrajghuman Oct 17, 2018
1d6792d
Update packages/footer/CHANGELOG.md
Oct 17, 2018
646ef85
Update packages/footer/CHANGELOG.md
Oct 17, 2018
50b8553
Update packages/footer/README.md
Oct 17, 2018
7024d09
Placed `au-footer__end` div inside a `row`
sukhrajghuman Oct 17, 2018
5e88f3f
Remove <a> from active items on main and side nav
Oct 18, 2018
b399890
Remove <a> from active items on main and side nav
Oct 18, 2018
baffe33
Adding chevron before active item
Oct 18, 2018
938742a
Dark active state
Oct 18, 2018
b51e867
Fix issue with A11yColor when white and black both pass
Oct 24, 2018
5a5ef37
Fix issue with A11yColor when white and black both pass
Oct 24, 2018
7e80ba9
Switched deployment manifests to nginx_buildpack
adamzerella Oct 25, 2018
47a6bd9
Bumped node version
adamzerella Oct 25, 2018
0a90203
Hotfix testing deploy-staging path
adamzerella Oct 25, 2018
2db861d
Added missing cd path
adamzerella Oct 25, 2018
c610d79
Removed invalid cd dir
adamzerella Oct 25, 2018
7b92fc4
Correct deploy nginx path
adamzerella Oct 25, 2018
e33feeb
Corrected and tested cp -r command
adamzerella Oct 25, 2018
7b69450
Refactored nginx naming convention
adamzerella Oct 25, 2018
dd1c728
Corrected CF manifest path
adamzerella Oct 25, 2018
1fc7a9a
Corrected prod deployment
adamzerella Oct 25, 2018
465a870
Revert main nav active item to link
sukhrajghuman Oct 31, 2018
7b97d64
Restored comma, my bad!
sukhrajghuman Oct 31, 2018
2d0db0c
Merge remote-tracking branch 'origin/develop' into develop
sukhrajghuman Nov 15, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
51 changes: 38 additions & 13 deletions .circleci/config.yml
Expand Up @@ -7,7 +7,8 @@ jobs:
# installing dependencies, building assets and deploying to staging
build-and-test-uikit:
docker:
- image: circleci/node:8.11.4 # NodeLTS as of 09/2018
- image: circleci/node:8.12.0 # NodeLTS as of 10/2018
working_directory: ~/uikit
steps:
- checkout # get the files from the repo (why would you ever not want the files????)
- run:
Expand All @@ -27,7 +28,7 @@ jobs:
name: Run all tests
command: npm test
- persist_to_workspace:
root: ~/project # /home/circleci/project
root: ~/uikit
paths:
- packages/*/tests/
- .deploy/
Expand All @@ -39,40 +40,64 @@ jobs:
- image: govau/cf-cli
steps:
- attach_workspace:
at: ~/project # /home/root/project
- run: echo 'uikit:$apr1$1L7jRN5s$rZ1johNREOkXwc7pGWxZK1' > Staticfile.auth # the password and username is not a secret. It is just to prevent spiders from indexing
at: ~/uikit
- run:
name: Deploying to y.cld.gov.au
command: |
cf login -a api.system.y.cld.gov.au -o $CF_ORG_STAGING -s $CF_SPACE_STAGING -u $CF_USER_STAGING -p $CF_PASSWORD_STAGING
cf zero-downtime-push uikit -f .deploy/manifest-staging.yml
cd ~/uikit
mkdir -p site/
cp .deploy/nginx/mime.types site/
cp .deploy/nginx/.htpasswd site/
mv .deploy/nginx/nginx-staging.conf site/nginx.conf
mv packages/ site/
mv index.html site/
mv .deploy/manifest-staging.yml site/
cd site/
cf login -a $CF_API_STAGING -o $CF_ORG_STAGING -s $CF_SPACE_STAGING -u $CF_USER_STAGING -p $CF_PASSWORD_STAGING
cf zero-downtime-push uikit -f manifest-staging.yml


deploy-testing:
docker:
- image: govau/cf-cli
steps:
- attach_workspace:
at: ~/project # /home/root/project
- run: echo 'uikit:$apr1$1L7jRN5s$rZ1johNREOkXwc7pGWxZK1' > Staticfile.auth # the password and username is not a secret. It is just to prevent spiders from indexing
at: ~/uikit
- run:
name: Deploying to y.cld.gov.au
command: |
cf login -a api.system.y.cld.gov.au -o $CF_ORG_STAGING -s $CF_SPACE_STAGING -u $CF_USER_STAGING -p $CF_PASSWORD_STAGING
cf zero-downtime-push uikit-$CIRCLE_BRANCH -f .deploy/manifest-testing.yml
cd ~/uikit
mkdir -p site/
cp .deploy/nginx/mime.types site/
cp .deploy/nginx/.htpasswd site/
mv .deploy/nginx/nginx-testing.conf site/nginx.conf
mv packages/ site/
mv index.html site/
mv .deploy/manifest-testing.yml site/
cd site/
cf login -a $CF_API_STAGING -o $CF_ORG_STAGING -s $CF_SPACE_STAGING -u $CF_USER_STAGING -p $CF_PASSWORD_STAGING
cf zero-downtime-push uikit -f manifest-testing.yml


deploy-prod:
docker:
- image: govau/cf-cli
steps:
- attach_workspace:
at: ~/project # /home/root/project
at: ~/uikit
- run:
name: Deploying to b.cld.gov.au
command: |
cf login -a api.system.b.cld.gov.au -o $CF_ORG_PROD -s $CF_SPACE_PROD -u $CF_USER_PROD -p $CF_PASSWORD_PROD
cf zero-downtime-push uikit -f .deploy/manifest-production.yml
cd ~/uikit
mkdir -p site/
cp .deploy/nginx/mime.types site/
mv .deploy/nginx/nginx-production.conf site/nginx.conf
mv packages/ site/
mv index.html site/
mv .deploy/manifest-production.yml site/
cd site/
cf login -a $CF_API_PROD -o $CF_ORG_PROD -s $CF_SPACE_PROD -u $CF_USER_PROD -p $CF_PASSWORD_PROD
cf zero-downtime-push uikit -f manifest-production.yml


# OUR WORKFLOW
Expand Down
3 changes: 3 additions & 0 deletions .deploy/buildpack.yml
@@ -0,0 +1,3 @@
---
nginx:
version: mainline
6 changes: 3 additions & 3 deletions .deploy/manifest-production.yml
@@ -1,9 +1,9 @@
---
applications:
- name: uikit
buildpack: staticfile_buildpack
buildpack: nginx_buildpack
memory: 64M
instances: 1

instances: 2
path: ./
routes:
- route: uikit.service.gov.au
4 changes: 2 additions & 2 deletions .deploy/manifest-staging.yml
@@ -1,9 +1,9 @@
---
applications:
- name: uikit
buildpack: staticfile_buildpack
buildpack: nginx_buildpack
memory: 64M
instances: 1

path: ./
routes:
- route: uikit.staging.service.gov.au
3 changes: 2 additions & 1 deletion .deploy/manifest-testing.yml
@@ -1,6 +1,7 @@
---
applications:
- name: uikit
buildpack: staticfile_buildpack
buildpack: nginx_buildpack
memory: 64M
instances: 1
path: ./
1 change: 1 addition & 0 deletions .deploy/nginx/.htpasswd
@@ -0,0 +1 @@
uikit:$apr1$1L7jRN5s$rZ1johNREOkXwc7pGWxZK1
78 changes: 78 additions & 0 deletions .deploy/nginx/mime.types
@@ -0,0 +1,78 @@
types {
text/html html htm shtml;
text/css css;
text/xml xml;
image/gif gif;
image/jpeg jpeg jpg;
application/x-javascript js;
application/atom+xml atom;
application/rss+xml rss;
font/ttf ttf;
font/woff woff;
font/woff2 woff2;
text/mathml mml;
text/plain txt;
text/vnd.sun.j2me.app-descriptor jad;
text/vnd.wap.wml wml;
text/x-component htc;
text/cache-manifest manifest;
image/png png;
image/tiff tif tiff;
image/vnd.wap.wbmp wbmp;
image/x-icon ico;
image/x-jng jng;
image/x-ms-bmp bmp;
image/svg+xml svg svgz;
image/webp webp;
application/java-archive jar war ear;
application/mac-binhex40 hqx;
application/msword doc;
application/pdf pdf;
application/postscript ps eps ai;
application/rtf rtf;
application/vnd.ms-excel xls;
application/vnd.ms-powerpoint ppt;
application/vnd.wap.wmlc wmlc;
application/vnd.google-earth.kml+xml kml;
application/vnd.google-earth.kmz kmz;
application/x-7z-compressed 7z;
application/x-cocoa cco;
application/x-java-archive-diff jardiff;
application/x-java-jnlp-file jnlp;
application/x-makeself run;
application/x-perl pl pm;
application/x-pilot prc pdb;
application/x-rar-compressed rar;
application/x-redhat-package-manager rpm;
application/x-sea sea;
application/x-shockwave-flash swf;
application/x-stuffit sit;
application/x-tcl tcl tk;
application/x-x509-ca-cert der pem crt;
application/x-xpinstall xpi;
application/xhtml+xml xhtml;
application/zip zip;
application/octet-stream bin exe dll;
application/octet-stream deb;
application/octet-stream dmg;
application/octet-stream eot;
application/octet-stream iso img;
application/octet-stream msi msp msm;
application/json json;
audio/midi mid midi kar;
audio/mpeg mp3;
audio/ogg ogg;
audio/x-m4a m4a;
audio/x-realaudio ra;
video/3gpp 3gpp 3gp;
video/mp4 mp4;
video/mpeg mpeg mpg;
video/quicktime mov;
video/webm webm;
video/x-flv flv;
video/x-m4v m4v;
video/x-mng mng;
video/x-ms-asf asx asf;
video/x-ms-wmv wmv;
video/x-msvideo avi;
}
47 changes: 47 additions & 0 deletions .deploy/nginx/nginx-production.conf
@@ -0,0 +1,47 @@

worker_processes 1;
daemon off;

error_log stderr;
events { worker_connections 1024; }

http {
charset utf-8;
log_format cloudfoundry '$http_x_forwarded_for - $http_referer - [$time_local] "$request" $status $body_bytes_sent';
access_log /dev/stdout cloudfoundry;
default_type application/octet-stream;
include mime.types;
sendfile on;

gzip on;
gzip_disable "msie6";
gzip_comp_level 6;
gzip_min_length 1100;
gzip_buffers 16 8k;
gzip_proxied any;
gunzip on;
gzip_static always;
gzip_types text/plain text/css text/js text/xml text/javascript application/javascript application/x-javascript application/json application/xml application/xml+rss;

tcp_nopush on;
keepalive_timeout 30;
port_in_redirect off; # Ensure that redirects don't include the internal container PORT - <%= ENV["PORT"] %>
server_tokens off;

server {
# Required for nginx-buildpack, interpolates value of $PORT.
listen {{port}};

server_name designsystem.gov.au

add_header X-Frame-Options "SAMEORIGIN";

# adding some custom rules to strip out the html extension
index index.html;

location / {
root ./;
try_files $uri $uri.html $uri/ $uri/index.html =404;
}
}
}
54 changes: 54 additions & 0 deletions .deploy/nginx/nginx-staging.conf
@@ -0,0 +1,54 @@
worker_processes 1;
daemon off;

error_log stderr;
events { worker_connections 1024; }

http {
charset utf-8;
log_format cloudfoundry '$http_x_forwarded_for - $http_referer - [$time_local] "$request" $status $body_bytes_sent';
access_log /dev/stdout cloudfoundry;
default_type application/octet-stream;
include mime.types;
sendfile on;

gzip on;
gzip_disable "msie6";
gzip_comp_level 6;
gzip_min_length 1100;
gzip_buffers 16 8k;
gzip_proxied any;
gunzip on;
gzip_static always;
gzip_types text/plain text/css text/js text/xml text/javascript application/javascript application/x-javascript application/json application/xml application/xml+rss;

tcp_nopush on;
keepalive_timeout 30;
port_in_redirect off; # Ensure that redirects don't include the internal container PORT - <%= ENV["PORT"] %>
server_tokens off;

server {
# Required for nginx-buildpack, interpolates value of $PORT.
listen {{port}};

server_name uikit.staging.service.gov.au;

add_header X-Frame-Options "SAMEORIGIN";

auth_basic "Restricted";
auth_basic_user_file .htpasswd;

# adding some custom rules to strip out the html extension
index index.html;

location / {
root ./;
try_files $uri $uri.html $uri/ $uri/index.html =404;
}

location /robots.txt {
add_header Content-Type text/plain;
return 200 "User-agent: *\nDisallow: *";
}
}
}
54 changes: 54 additions & 0 deletions .deploy/nginx/nginx-testing.conf
@@ -0,0 +1,54 @@
worker_processes 1;
daemon off;

error_log stderr;
events { worker_connections 1024; }

http {
charset utf-8;
log_format cloudfoundry '$http_x_forwarded_for - $http_referer - [$time_local] "$request" $status $body_bytes_sent';
access_log /dev/stdout cloudfoundry;
default_type application/octet-stream;
include mime.types;
sendfile on;

gzip on;
gzip_disable "msie6";
gzip_comp_level 6;
gzip_min_length 1100;
gzip_buffers 16 8k;
gzip_proxied any;
gunzip on;
gzip_static always;
gzip_types text/plain text/css text/js text/xml text/javascript application/javascript application/x-javascript application/json application/xml application/xml+rss;

tcp_nopush on;
keepalive_timeout 30;
port_in_redirect off; # Ensure that redirects don't include the internal container PORT - <%= ENV["PORT"] %>
server_tokens off;

server {
# Required for nginx-buildpack, interpolates value of $PORT.
listen {{port}};

server_name localhost;

add_header X-Frame-Options "SAMEORIGIN";

auth_basic "Restricted";
auth_basic_user_file .htpasswd;

# adding some custom rules to strip out the html extension
index index.html;

location / {
root ./;
try_files $uri $uri.html $uri/ $uri/index.html =404;
}

location /robots.txt {
add_header Content-Type text/plain;
return 200 "User-agent: *\nDisallow: *";
}
}
}
6 changes: 6 additions & 0 deletions packages/main-nav/CHANGELOG.md
Expand Up @@ -15,6 +15,7 @@

## Versions

* [v1.0.0 - Wrap active item in main-nav in an `<a>` and add `aria-current="page"`](#v100)
* [v0.2.0 - Active items are no longer wrapped in `<a>` for accessibility](#v020)
* [v0.1.4 - Fix passing props to main nav react component](#v014)
* [v0.1.3 - Added an aria-label attribute to the nav element](#v013)
Expand All @@ -28,6 +29,11 @@

## Release History

### v1.0.0

- Wrap active item in main-nav in an `<a>` and add `aria-current="page"`


### v0.2.0

- Active items are no longer wrapped in `<a>` for accessibility
Expand Down