Skip to content

Commit

Permalink
Merge pull request #313 from SPANDigital/develop
Browse files Browse the repository at this point in the history
feat: merge for dashboard mvp
  • Loading branch information
Zalaras authored Oct 31, 2024
2 parents 4d7798f + 8fa80be commit da249a4
Show file tree
Hide file tree
Showing 47 changed files with 7,415 additions and 1,154 deletions.
17 changes: 17 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
## Description

## Issue
- [ ] :clipboard: JIRA_TICKET_URL

## Screenshots

## PR Readiness Checks
- [ ] Your PR title conforms to conventional commits `<type>: <jira-ticket-num><title>`, for example: `fix: PRSDM-123 issue with login` with a maximum of 100 characters
- [ ] You have performed a self-review of your changes via the GitHub UI
- [ ] Comments were added to new code that can not explain itself (see [reference 1](https://bpoplauschi.github.io/2021/01/20/Clean-Code-Comments-by-Uncle-Bob-part-2.html) and [reference 2](https://blog.cleancoder.com/uncle-bob/2017/02/23/NecessaryComments.html))
- [ ] New code adheres to the following quality standards:
- Function Length ([see reference](https://martinfowler.com/bliki/FunctionLength.html))
- Meaningful Names ([see reference](https://learning.oreilly.com/library/view/clean-code-a/9780136083238/chapter02.xhtml))
- DRY ([see reference](https://java-design-patterns.com/principles/#keep-things-dry))
- YAGNI ([see reference](https://java-design-patterns.com/principles/#yagni))
- [ ] Changes were tested locally
21 changes: 21 additions & 0 deletions .github/workflows/lint-pr-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: "Lint PR Title"

on:
pull_request:
types:
- opened
- reopened
- edited
- synchronize
permissions:
pull-requests: read
contents: read
packages: read
jobs:
main:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19 changes: 19 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: release
on:
push:
branches:
- main
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
persist-credentials: false # to disable default GITHUB_TOKEN

- name: Semantic Release
uses: cycjimmy/semantic-release-action@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ node_modules
.idea/
resources/
themes/
public/

# Yarn Berry
yarn-error.log
Expand Down
29 changes: 29 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"branches": ["main", { "name": "develop", "prerelease": "rfv" }, "+([0-9])?(.{+([0-9]),x}).x"],
"plugins": [
["@semantic-release/commit-analyzer",
{
"releaseRules": [
{
"type": "refactor",
"release": "patch"
}
]
}
],
["@semantic-release/release-notes-generator",
{
"presetConfig": {
"types": [
{
"type": "refactor",
"section": "Refactors",
"hidden": false
}
]
}
}
],
["@semantic-release/github"]
]
}
55 changes: 55 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,3 +228,58 @@
## 2024-03-04
### Bugfix
- External links require the SASS url function for the SASS loader HUGO uses. @CharlRitterDev https://spandigital.atlassian.net/browse/PRSDM-5893

## 2024-07-05
### Updates
- Font & typography alignments updates. @CharlRitterDev https://spandigital.atlassian.net/browse/PRSDM-5980

## 2024-07-10
### Updates
- Merge release apple branch. @CharlRitterDev & @WiaanBotha

## 2024-07-17
### Updates
- Add resizer back. @CharlRitterDev https://spandigital.atlassian.net/browse/PRSDM-6012

## 2024-07-29
### Features
- Splitting of js & css build files. @CharlRitterDev https://spandigital.atlassian.net/browse/PRSDM-6018

## 2024-08-05
### Bugfix
- Add relative position for pre and code to fix alignment issue with copy button on enterprise. @Zalaras https://spandigital.atlassian.net/browse/PRSDM-6124

## 2024-08-06
### Bugfix
- Update line-height of caret in the left nav menu to better align with link text. @Zalaras https://spandigital.atlassian.net/browse/PRSDM-6128

## 2024-08-14
### Bugfix
- Center navbar header content, fix navbar header image size & improve how navbar determines height. @CharlRitterDev https://spandigital.atlassian.net/browse/PRSDM-6146

## 2024-09-09
### Features
- Remove Roles dropdown and align the sidenav to match latest designs. @CharlRitterDev https://spandigital.atlassian.net/browse/PRSDM-6329
### Bugfix
- Fix sidenav items wrapping on hover. @CharlRitterDev https://spandigital.atlassian.net/browse/PRSDM-6206

## 2024-09-09
### Feature
- Added quality category label from release/apple. @mpilo-khathwane https://spandigital.atlassian.net/browse/PRSDM-6292

## 2024-09-17
### Fix
- Added `aria-label` fields to articles for voice over functionality. @Quantumplate https://spandigital.atlassian.net/browse/PRSDM-6345

## 2024-10-02
### Refactor
- Add horizontal scrollbar to code blocks. @julianbyte https://spandigital.atlassian.net/browse/PRSDM-5974

## 2024-10-03
### Bugfix
- Set the width of the sidenav if there isn't one already set. @kelvinmanley https://spandigital.atlassian.net/browse/PRSDM-6369
- Add styling for quality category label. @mpilo-khathwane https://spandigital.atlassian.net/browse/PRSDM-6208

## 2024-10-21
### Refactor
- Bundle bootstrap and jquery and remove CDN calls. Apple PR https://spandigital.atlassian.net/browse/PRSDM-6549
80 changes: 80 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,83 @@ module:
imports:
- path: presidium-theme-website
```

---

## Conventional Commits

At SPAN we use [Conventional Commits 1.0.0](https://www.conventionalcommits.org/en/v1.0.0/) to make our commit messages more useful.

### Installation

To install the dependencies for the conventional commits, please use:
```bash
make commitlint
```

### Usage

After installation you can use `git cz` and run through the options, it will build your commit message. For example:

```
? Select the type of change that you're committing: refactor: A code change that neither fixes a bug nor adds a feature (formatting, performance improvement, etc)
? Enter JIRA issue (AK-12345) (optional): PRSDM-5026
? What is the scope of this change (e.g. component or file name): (press enter to skip)
? Write a short, imperative tense description of the change:
[------------------------------------------------------------------------] 51 chars left
refactor: PRSDM-5026 update makefile and readme
? Provide a longer description of the change: (press enter to skip)
? Are there any breaking changes? No
? Does this change affect any open issues? No
```

> **Important!** Any use of `breaking changes` needs to be confirmed with the team as this increments the major version number.
### Commitizen

[Commitizen](http://commitizen.github.io/cz-cli/) is a CLI tool that prompts you to fill in the required commit fields at commit time.
After the setup, you should be able to use `git cz` to build your commit messages.

[Commitizen Jira Smart Commit Plugin](https://github.com/anastariqkhan/cz-conventional-changelog-jira-smart-commits) expands to traditional
commitizen prompt to also prompts for a Jira issue and how you would like update the Jira issue.

### Conventional Commit Intellij Plugin

If you use Intellij IDEA as your IDE, you could install the [Conventional Commit Plugin](https://plugins.jetbrains.com/plugin/13389-conventional-commit), and then
you can build your conventional commit messages directly in the IDE.

### Commit Linting

[Commitlint](https://commitlint.js.org/#/) is used for linting the commit messages on the CI pipeline to ensure that all commit messages adhere to the Conventional Commits 1.0.0 specification.

[Husky](https://typicode.github.io/husky/) is used for a [commit hook](https://commitlint.js.org/guides/local-setup.html#using-a-git-hooks-manager).

---

## Semantic Releases

This repository uses [Semantic Release](https://semantic-release.gitbook.io/semantic-release/) tool to automate version management and package publishing.

Upon merging into to the main or develop branch, Semantic Release tool will:
- Calculate the new release version based on the commits
- Create a git commit and a git tag for the release
- Create a Release with release notes from the commit messages
- Create and publish the container images

---

## Branching

Please see this [Presidium Git Strategy Miro board](https://miro.com/app/board/uXjVPK0XxiU=/).

In summary:
- `main` ⇾ production
- Only hotfixes or `develop` get merged into `main`
- `develop`
- Feature branches and bug fixes are branched from and merged into `develop`
- `feat/<TITLE>`
- If there is a feature in development it will be on a feature branch

---

10 changes: 8 additions & 2 deletions assets/_sass/_default-fonts.scss
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
@import url('https://fonts.googleapis.com/css2?family=Open+Sans&display=swap');
@import url('https://use.typekit.net/cpr8cmy.css'); // TODO This can be removed to the span theme when it's created

html,
body {
font-family: $primary-font-family;
font-family: $primary-font-family !important;
}

code,
kbd,
pre,
samp {
font-family: monospace;
font-family: monospace !important;
position: relative;

span {
font-family: monospace !important;
}
}
3 changes: 2 additions & 1 deletion assets/_sass/_default-variables.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Bootsrap & Bootswatch color overrides
$brand-primary: #e49134 !default;
$brand-info: #eb9110;
$brand-tint: rgba(254, 178, 70, 1);
$navbar-default-link-hover-color: $brand-info;
$navbar-default-link-hover-bg: white;
$link-color: #e49134;
Expand All @@ -18,7 +19,7 @@ $color-red: #e52213;
$color-dark-grey: #3d3d3d;

// Fonts
$primary-font-family: 'Open Sans' !default;
$primary-font-family: proxima-nova !default; // TODO This should be 'Open Sans', but until we have a span theme, this is proxima nova

// Extracted from spacelab theme:
// Colors
Expand Down
7 changes: 0 additions & 7 deletions assets/_sass/_editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,11 @@ body::after {

.ok-button {
font-weight: normal;
font-size: 13px;
text-align: center;
color: black;
transition: background-color 0.01s;
border-radius: 4px;
height: 20px;
line-height: 0;
margin: auto 0;
border: none;
background-color: white;
Expand All @@ -135,8 +133,6 @@ body::after {
background-color: #000;
grid-template-columns: 40px auto;
width: 197px;
font-weight: normal;
font-size: 13px;
}

.popup-tick {
Expand Down Expand Up @@ -194,7 +190,6 @@ body::after {
color: grey;
}

font-size: 14px;

.dropdown {
.dropdown__control {
Expand Down Expand Up @@ -256,8 +251,6 @@ body::after {
left: 50%;
margin-left: -175px;
margin-top: -84px;
font-weight: normal;
font-size: 15px;
word-break: normal;

.title {
Expand Down
3 changes: 3 additions & 0 deletions assets/_sass/_fonts.scss
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
// Don't remove, this file is the default

// Include open sans
@import url('https://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700');
3 changes: 1 addition & 2 deletions assets/_sass/_image.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
//Article Images
img {
max-width: 100%;
width: auto;
display: block;
padding: 10px;
margin: 10px auto 5px;
Expand Down Expand Up @@ -49,9 +50,7 @@

span {
color: white;
font-size: 30px;
font-weight: bold;
line-height: 1;
text-shadow: 0 1px 0 #000;
opacity: 0.6;
filter: alpha(opacity=60);
Expand Down
Loading

0 comments on commit da249a4

Please sign in to comment.