Skip to content
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
76 changes: 42 additions & 34 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
### JIRA/RoadMap
_Provide your ticket number
[TD-####](https://hee-tis.atlassian.net/browse/TD-####)
[Git Ticket Board](https://github.com/orgs/TechnologyEnhancedLearning/projects/9)[Ticket Board](https://github.com/orgs/TechnologyEnhancedLearning/projects/9)
[Git Ticket Board](https://github.com/orgs/TechnologyEnhancedLearning/projects/9)
[Git Ticket](https://github.com/TechnologyEnhancedLearning/TELBlazor/issues/42)

### Description
Expand All @@ -20,27 +20,39 @@ _Paste screenshots for all views created or changed: mobile, tablet and desktop,

### Linked package consumer tasks
[TD-####](https://hee-tis.atlassian.net/browse/TD-####)
[ ] Consumers also need to update nhsuk css dependency to : __put_required_nhsuk_semantic_version_here__
- [ ] Consumers also need to update nhsuk css dependency to : __put_required_nhsuk_semantic_version_here__

### Logging
_Provide description of any component scoped logging or specific level logging to check

### Performance comparison

Complete the below comparison table to check for any concerning changes in performance.
- [ ] Check performance and tick the box. Or complete the table or just a note for the relevant row.

Use **Incognito** mode and **disable cache** in the Network tab to get a cold load comparison.


Use two browsers both **Incognito** mode and **disable cache** in the Network tab to get a cold load comparison for
[Dev showcase](https://technologyenhancedlearning.github.io/TELBlazor-DevShowCase/) for your package version.
[Prod showcase](https://technologyenhancedlearning.github.io/TELBlazor/) for a comparison of the change.


**Open Incognito Browsers**
1. Open the Developer Tools (F12 or Ctrl+Shift+I)
1. Go to networking
1. Clear log
1. record
1. Disable cache
1. Then go to lighthouse tab

**Lighthouse**

1. Open the Developer Tools (F12 or Ctrl+Shift+I).
2. Go to the **Lighthouse** tab.
3. Deselect the "SEO" category.
4. Select "Desktop" for the device.
5. Choose "Navigation (Analyze page load)".
6. Click "Analyze page load" and wait for the results.
1. Go to the **Lighthouse** tab.
1. Deselect the "SEO" category.
1. Select "Desktop" for the device.
1. Choose "Navigation (Analyze page load)".
1. Click "Analyze page load" and wait for the results.

Here's an example of what to look for and compare:
Record in the table, or compare for change:

* **First Contentful Paint**: The time it takes for the first text or image to appear. A lower value is better.
* **Speed Index**: How quickly content is visually displayed during page load. A lower value is better.
Expand All @@ -50,26 +62,23 @@ Here's an example of what to look for and compare:
**Network**

1. Go to the **Network** tab.
2. Ensure **"Disable cache"** is checked.
3. **Clear** the log.
4. **Preserve log** can be checked to maintain a history of requests.
5. Perform a hard reload (Ctrl+Shift+R or Cmd+Shift+R).
6. Copy and paste the bottom line of the log to get the following metrics:
1. Copy and paste the bottom line of the log to get the following metrics:

Record in the table, or compare for change:
* **Requests**: The total number of requests made.
* **Transferred**: The compressed size of all transferred resources.
* **Resources**: The total uncompressed size of all resources.
* **Finish**: The time from the request initiation to the completion of the last response.

You can also use the `.wasm` filter in the Network tab to inspect the sizes of individual WebAssembly files.

---

### Comparison Table
**Wave Test**
1. Right click page with WAVE plugin installed and run wave
1. Check component is WCAG AAA navigate to component page

Please fill in the table below with the values from both the Dev and Prod environments.
*or just check the values if its quicker and make sure to highlight anything concerning*
| Measure | [Dev Showcase](https://technologyenhancedlearning.github.io/TELBlazor-DevShowCase/) | [Prod](https://technologyenhancedlearning.github.io/TELBlazor/) | Notes (E.g. Significant change) |
| Measure | [Dev Showcase](https://technologyenhancedlearning.github.io/TELBlazor-DevShowCase/) | [Prod](https://technologyenhancedlearning.github.io/TELBlazor/) | Notes |
| :--- | :--- | :--- | :--- |
| **Lighthouse Performance Score** | | | |
| **Lighthouse Accessibility Score** | | | |
Expand All @@ -82,47 +91,46 @@ Please fill in the table below with the values from both the Dev and Prod enviro
| **Resources (Full App Weight)** | | | |
| **Requests** | | | |
| **Finish Time** | | | |
| **WCAG AAA** | | | |


-----
### Developer checks
(Leave tasks unticked if they haven't been appropriate for your ticket.)

I have:
- [ ] Provided showcase example of component if applicable
- [ ] Added appropriate logging and scopped logging reporting in appsettings for component if applicable
- [ ] Provided showcase example of component
- [ ] Added appropriate logging and scoped logging reporting in appsettings for component if applicable
- [ ] Updated readme documentation
- [ ] Updated showcase documentation for component
- [ ] I have locally run tests against a local package (not just using project reference)
- [ ] Used a browser set to No Js before using it to locally run and test changes (recommend brave as second browser)
- [ ] Written Unit tests with accesibility syntax
- [ ] Written E2E tests with accesibility syntax and accessibility test
- [ ] Tested components with [Wave Chrome plugin](https://chrome.google.com/webstore/detail/wave-evaluation-tool/jbbplnpkjmmeebjpijfedlgcdilocofh/related). Addressed any valid accessibility issues and documented any invalid errors
- [ ] [Check code coverage](https://technologyenhancedlearning.github.io/TELBlazor-CodeReport/) or locally with local report generation
- [ ] Check code coverage [Dev pipeline report page](https://technologyenhancedlearning.github.io/TELBlazor-CodeReport/) or locally with local report generation. (Focus on new area)
- [ ] Updated my Jira ticket with testing notes, including information about other parts of the system that were touched as part of the PR and need to be tested to ensure nothing is broken
- [ ] Tested in [Dev Showcase](https://technologyenhancedlearning.github.io/TELBlazor-DevShowCase/) (including logging by using log level switcher)
- [ ] Scanned over my pull request and commented with any useful explanations/questions to reviewers
- [ ] Scanned over cicd warnings relating to the component or area of code I have worked on (give the general ones a look too but antyhing in OptionalImplementations/Test can be ignored)
- [ ] Maybe? Audit NuGet packages; use lightweight ones (e.g., System.Text.Json); ensure third-party components support trimming.
- [ ] Scanned in visual studio build info messages about improving code for new code
- [ ]
- [ ] Auditted new NuGet packages prefering lightweight ones (e.g., System.Text.Json) and ensuring third-party components support trimming.
- [ ] Looked at build messages specifically for new code.

---
### Peer Reviewers and Assignee checks before Approval
- [ ] Feedback has been provided
- [ ] Project has been run locally (you can provide pr feedback via vs if desired)
- [ ] Project has been run locally
- [ ] Locally checked in browser set to No Js from before load (recommend Brave with no js settings)
- [ ] [Dev Showcase](https://technologyenhancedlearning.github.io/TELBlazor-DevShowCase/) was checked and it was checked the package number matched the PR
- [ ] In Dev Showcase checked against different logging levels if applicable (use log level switcher to change level)
- [ ] All conversations have been responded to (emoji will do) and marked resolved
- [ ] Out of scope code observations have been recorded to inform future tasks
- [ ] Common questions / Architectural explanations decisions from PR documented
- [ ] [Check code coverage](https://technologyenhancedlearning.github.io/TELBlazor-CodeReport/)
- [ ] Should E2E or Unit test have been added
- [ ] If the published dev package is linked and used in tandom with a package consumer task is it working locally (Not a hard requirement but useful in case changes required)
- [ ] Checked [code coverage](https://technologyenhancedlearning.github.io/TELBlazor-CodeReport/)
- [ ] Checked not missing E2E or Unit tests
- [ ] Linked task for the consumption of the new component has been given a link to the dev package to help development.
- [ ] Checked component readme in Showcase

---
### Post PR Intentions and Actions
- [ ] On merge will someone check [Prod Showcase](https://technologyenhancedlearning.github.io/TELBlazor/)
- [ ] Tick yes if consuming projects need a version bump and/or code changes to take advantage of new components etc
- [ ] If there is a linked consuming project task has the task assignee, or task been updated to know the package is available as a dev/prod version and been provided the version number.
- Check [Prod Showcase](https://technologyenhancedlearning.github.io/TELBlazor/)
- If prod bumps the version share that the consuming projects should update to the nevew version.
6 changes: 0 additions & 6 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,10 @@ jobs:
id: detect_semantic_version
run: |

#set +e
# Due to dry-run need to catch error differently : SEMVER_OUTPUT_RAW=$(npx semantic-release --dry-run 2>&1) || STATUS=$?
echo "running semantic-release"
SEMVER_OUTPUT_RAW=$(npx semantic-release --dry-run 2>&1)
STATUS=$?
echo "status = $STATUS"
#set -e
echo "$SEMVER_OUTPUT_RAW"

# Get fallback version by grabbing the git tag dropping the first character, the "v", or use hardcoded fallback
Expand All @@ -105,7 +102,6 @@ jobs:
set +e
# Check what's in the output
GREP_NO_CHANGES=$(echo "$SEMVER_OUTPUT_RAW" | grep -q 'There are no relevant changes' && echo "true" || echo "false")
# qqqq GREP_WOULD_PUBLISH=$(echo "$SEMVER_OUTPUT_RAW" | grep -q 'Dry run: would publish version' && echo "true" || echo "false")
GREP_WOULD_PUBLISH=$(echo "$SEMVER_OUTPUT_RAW" | grep -q 'Published release' && echo "true" || echo "false")
echo "GREP_NO_CHANGES=$GREP_NO_CHANGES"
echo "GREP_WOULD_PUBLISH=$GREP_WOULD_PUBLISH"
Expand All @@ -117,7 +113,6 @@ jobs:
echo "No relevant changes found - DEV_SEMVER_VERSION=$DEV_SEMVER_VERSION"
echo "DEV_SEMVER_VERSION=$DEV_SEMVER_VERSION" >> $GITHUB_ENV
# Check if version bump expected
# qqqq elif echo "$SEMVER_OUTPUT_RAW" | grep -q 'Dry run: would publish version'; then
elif echo "$SEMVER_OUTPUT_RAW" | grep -q 'Published release'; then
# Extract the actual version
DEV_SEMVER_VERSION=$(echo "$SEMVER_OUTPUT_RAW" | grep -oP 'Published release \K[^\s]+' || echo "extract-failed")
Expand Down Expand Up @@ -349,7 +344,6 @@ jobs:
# Echo the artifact URL to confirm
echo "Artifact URL: $ARTIFACT_URL"
echo "artifact_url=$ARTIFACT_URL" >> $GITHUB_ENV


- name: Trigger workflow in TELBlazor-DevShowCase repo
run: |
Expand Down
62 changes: 1 addition & 61 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,67 +85,7 @@ jobs:
exit 1
fi


# 0 not exclusively due to no version bump so check output
# if [ "${STATUS:-0}" -ne 0 ]; then
# echo "Status code is not 0"
# if echo "$SEMVER_OUTPUT_RAW" | grep -q "No release published"; then
# echo "no version change detected"
# # No new version, but we can find the current version
# #echo "No new version required getting current version from git tags"
# #SEMVER_VERSION=$(git describe --tags --abbrev=0 2>/dev/null || echo "0.0.0-version-placeholder") # last git tag
# echo "semantic-release-version=$SEMVER_VERSION"
# SEMVER_CHANGED=false
# echo "Changes do not warrant a version change. gh_pages and packages won't be updated."
# #echo "semantic-release-version=$SEMVER_VERSION" >> $GITHUB_OUTPUT
# echo "semantic-version-change-required=$SEMVER_CHANGED" >> $GITHUB_OUTPUT
# exit 0 # treat as success code didnt fail there just was no version increment required
# else
# echo "exit using status outcome of semver"
# exit $STATUS # real error → fail pipeline
# fi
# else
# echo "grep semver version"
# SEMVER_VERSION=$(echo "$SEMVER_OUTPUT_RAW" | grep -oP 'Published release \K[\d.]+')
# echo "semantic-release-version=$SEMVER_VERSION"
# # qqqq VERSION=$(echo "$OUTPUT" | grep "Published release" | awk '{print $NF}') - AI suggestion try if issues
# # awk is a text-processing tool that splits each line into fields using whitespace by default.
# # $NF is a special variable in awk that means “the last field” of the current line.
# # print $NF prints just that last field.
# SEMVER_CHANGED=true
# echo "semantic-version-change-required=$SEMVER_CHANGED"
# echo "version change required true"
# echo "semantic-release-version=$SEMVER_VERSION" >> $GITHUB_OUTPUT
# echo "semantic-version-change-required=$SEMVER_CHANGED" >> $GITHUB_OUTPUT
# # Just because weve been handling errors
# exit 0
# fi

#configured with .releaseserc
# qqqq- name: Run semantic release
# id: set_semantic_version
# run: |
# set +e
# RELEASE_OUTPUT=$(npx semantic-release 2>&1)
# echo "$RELEASE_OUTPUT"

# # Try to extract the version from the full output
# SEMVER_VERSION=$(echo "$RELEASE_OUTPUT" | grep -oP 'Published release \K[\d.]+')

# # Output it clearly for debugging
# echo "Parsed semantic-release version: $SEMVER_VERSION"

# # Set GitHub Action output
# echo "semantic-release-version=$SEMVER_VERSION" >> $GITHUB_OUTPUT

# # Check if SEMVER_VERSION is empty and echo the message if so
# if [ -z "$SEMVER_VERSION" ]; then
# echo "Changes do not warrant a version change. gh_pages and packages won't be updated."
# fi
# set -e




build-telblazor-package-and-publish:
needs: [generate-semantic-version]
runs-on: ubuntu-latest
Expand Down
Loading