Skip to content

Commit

Permalink
feat: release 2023-03-10 (#1574)
Browse files Browse the repository at this point in the history
* fix: reset focus for NVDA (#1556)

* fix: first attempt to reset focus for nvda

* fix: attemmpt with asPath approach

* fix: reset focus in application file

* fix: missing tabIndex value

* fix: hidden new page approach

* fix: new page with state

* fix: functional navigation announcement

* fix: cleaned up css approach

* fix: remove unused css

* fix: remove space typo

* fix: nvda testing without alert

* fix: re-instate alert

* fix: simpler solution for cross browser support

* fix: remove alert since focused

* fix: announcement clean up

* fix: variable naming

* fix: announcement updates pr LH feedback

* fix: heading level typo

* fix: clean up string handling

* fix: clean up rebase

* feat: change labels for no min/max rent (#1569)

* fix: release ux issues (#1571)

* refactor: uptake uic siteheader (#1565)

* fix: show all listings button labels (#1568)

* feat: add meaningful labels to filter buttons

* feat: change reset button label

* fix: add missing filter translations for spanish

* fix: cherry-picked forgot-password from core (#1566)

* fix: cherry-picked commit from core

* fix: update testing approach to mirror core

* fix: undo core test mirroring

* fix: resolve testing error

* fix: revert unrelated changes

* fix: space cleanup

* fix: space cleanup pt 2

* fix: translations added

* fix: custom focus management (#1572)

* fix: custom focus management

* fix: clean up + commenting

* fix: remove auto fix from linter

* fix: add missing screen reader only  labels to fields (#1573)

* fix: update to community type draggability (#1578)

* fix: description grid misalignment (#1581)

* fix: description grid misalignment

* fix: description misalignment

---------

Co-authored-by: ColinBuyck <[email protected]>
Co-authored-by: Krzysztof Zięcina <[email protected]>
Co-authored-by: Emily Jablonski <[email protected]>
Co-authored-by: Yazeed Loonat <[email protected]>
  • Loading branch information
5 people authored Mar 15, 2023
1 parent 15a2c30 commit 8051ae7
Show file tree
Hide file tree
Showing 38 changed files with 449 additions and 1,658 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
with:
eslint: true
prettier: true
auto_fix: true
auto_fix: false

- name: Run separate lint command
run: yarn lint
6 changes: 2 additions & 4 deletions backend/core/src/auth/services/user.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,11 +258,9 @@ describe("UserService", () => {
})

describe("forgotPassword", () => {
it("should return 400 if email is not found", async () => {
it("should return undefined if email is not found", async () => {
mockUserRepo.findOne = jest.fn().mockResolvedValue(null)
await expect(service.forgotPassword({ email: "[email protected]" })).rejects.toThrow(
new HttpException(USER_ERRORS.NOT_FOUND.message, USER_ERRORS.NOT_FOUND.status)
)
await expect(service.forgotPassword({ email: "[email protected]" })).resolves.toBeUndefined()
})

it("should set resetToken", async () => {
Expand Down
16 changes: 7 additions & 9 deletions backend/core/src/auth/services/user.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -436,16 +436,14 @@ export class UserService {

public async forgotPassword(dto: ForgotPasswordDto) {
const user = await this.findByEmail(dto.email)
if (!user) {
throw new HttpException(USER_ERRORS.NOT_FOUND.message, USER_ERRORS.NOT_FOUND.status)
if (user) {
// Token expires in 1 hour
const payload = { id: user.id, exp: Number.parseInt(dayjs().add(1, "hour").format("X")) }
user.resetToken = encode(payload, process.env.APP_SECRET)
await this.userRepository.save(user)
await this.emailService.forgotPassword(user, dto.appUrl)
return user
}

// Token expires in 1 hour
const payload = { id: user.id, exp: Number.parseInt(dayjs().add(1, "hour").format("X")) }
user.resetToken = encode(payload, process.env.APP_SECRET)
await this.userRepository.save(user)
await this.emailService.forgotPassword(user, dto.appUrl)
return user
}

public async updatePassword(dto: UpdatePasswordDto) {
Expand Down
1 change: 0 additions & 1 deletion detroit-ui-components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export * from "./src/global/vendor/AgPagination"
/* Headers */
export * from "./src/headers/Hero"
export * from "./src/headers/PageHeader"
export * from "./src/headers/SiteHeader"
export * from "./src/headers/Heading"
export * from "./src/headers/HeadingGroup"
export * from "./src/headers/StepHeader"
Expand Down
2 changes: 1 addition & 1 deletion detroit-ui-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
},
"dependencies": {
"@bloom-housing/backend-core": "^4.4.0",
"@bloom-housing/ui-components": "^8.0.0",
"@bloom-housing/ui-components": "^8.2.0",
"@bloom-housing/shared-helpers": "^4.4.0",
"@fortawesome/fontawesome-svg-core": "^6.1.1",
"@fortawesome/free-regular-svg-icons": "^6.1.1",
Expand Down
2 changes: 1 addition & 1 deletion detroit-ui-components/src/global/tokens/sizes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
--bloom-s2: 0.5rem;
--bloom-s2_5: 0.625rem;
--bloom-s3: 0.75rem;
--bloom-s3_5: 0.875;
--bloom-s3_5: 0.875rem;
--bloom-s4: 1rem;
--bloom-s5: 1.25rem;
--bloom-s6: 1.5rem;
Expand Down
1 change: 1 addition & 0 deletions detroit-ui-components/src/headers/PageHeader.scss
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
font-size: var(--title-font-size);
text-align: left;
}
word-break: break-word;
}

.page-header__lead {
Expand Down
Loading

0 comments on commit 8051ae7

Please sign in to comment.