Skip to content

web: expressing success#7830

Merged
BeryJu merged 5 commits intomainfrom
web/expressing-success-messages
Dec 13, 2023
Merged

web: expressing success#7830
BeryJu merged 5 commits intomainfrom
web/expressing-success-messages

Conversation

@kensternberg-authentik
Copy link
Contributor

@kensternberg-authentik kensternberg-authentik commented Dec 9, 2023

Details

Ever see an idiom that just, I dunno, annoyed you?

This commit converts 56 if statements in which both branches are of the same shape and type ("success message") into if expressions. It also extracts repeated instances of the function that produces those success messages into abstract parent classes for a variety of child forms that use the same base model on the Django side: Policy, PropertyMapping, Provider, Source, and Stage. A nice win is that each of these makes concrete and clear the primary key type for those base models.

All of this was done with a pair of "automated" tools; syntactical tools, true, but still automated. And ESLint, Prettier, SonarJS and TSC all kept me honest. Automated tools for the win.

Checklist

  • Local tests pass (ak test authentik/)
  • The code has been formatted (make lint-fix)

If an API change has been made

  • The API schema has been updated (make gen-build)

If changes to the frontend have been made

  • The code has been formatted (make web)
  • The translation files have been updated (make i18n-extract)

If applicable

  • The documentation has been updated
  • The documentation has been formatted (make website)

Ever see an idiom that just, I dunno, *annoyed* you?

Automated tools for the win.
@netlify
Copy link

netlify bot commented Dec 9, 2023

Deploy Preview for authentik-storybook ready!

Name Link
🔨 Latest commit 1041f7b
🔍 Latest deploy log https://app.netlify.com/sites/authentik-storybook/deploys/657739088e9bae00088c23a2
😎 Deploy Preview https://deploy-preview-7830--authentik-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@codecov
Copy link

codecov bot commented Dec 9, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (1fccbaa) 43.71% compared to head (1041f7b) 92.63%.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #7830       +/-   ##
===========================================
+ Coverage   43.71%   92.63%   +48.92%     
===========================================
  Files         588      588               
  Lines       29200    29200               
===========================================
+ Hits        12764    27049    +14285     
+ Misses      16436     2151    -14285     
Flag Coverage Δ
e2e 50.65% <ø> (+6.94%) ⬆️
integration 25.91% <ø> (?)
unit 89.70% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@netlify
Copy link

netlify bot commented Dec 9, 2023

Deploy Preview for authentik ready!

Name Link
🔨 Latest commit 1041f7b
🔍 Latest deploy log https://app.netlify.com/sites/authentik/deploys/657739082cd1c00008b3d9bd
😎 Deploy Preview https://deploy-preview-7830--authentik.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 97 (no change from production)
Accessibility: 90 (no change from production)
Best Practices: 100 (no change from production)
SEO: 80 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@kensternberg-authentik kensternberg-authentik marked this pull request as ready for review December 9, 2023 19:17
@kensternberg-authentik kensternberg-authentik requested a review from a team as a code owner December 9, 2023 19:17
* main:
  scripts: postgres, redis: only listen on localhost (#7849)
  website: bump @types/react from 18.2.42 to 18.2.43 in /website (#7840)
  web: bump ts-node from 10.9.1 to 10.9.2 in /tests/wdio (#7846)
  core: bump github.com/go-openapi/runtime from 0.26.0 to 0.26.2 (#7841)
  website: bump prettier from 3.1.0 to 3.1.1 in /website (#7839)
  web: bump the esbuild group in /web with 2 updates (#7842)
  web: bump rollup from 4.6.1 to 4.7.0 in /web (#7843)
  web: bump prettier from 3.1.0 to 3.1.1 in /web (#7844)
  web: bump the wdio group in /tests/wdio with 2 updates (#7845)
  web: bump prettier from 3.1.0 to 3.1.1 in /tests/wdio (#7847)
  translate: Updates for file web/xliff/en.xlf in fr (#7851)
  translate: Updates for file locale/en/LC_MESSAGES/django.po in fr (#7850)
  core: bump python from 3.12.0-slim-bookworm to 3.12.1-slim-bookworm
  web/flows: update flow background (#7833)
  web/flows: fix logo height (#7834)
  Fix cache related image build issues
@BeryJu BeryJu merged commit b181c55 into main Dec 13, 2023
@BeryJu BeryJu deleted the web/expressing-success-messages branch December 13, 2023 15:13
kensternberg-authentik added a commit that referenced this pull request Jan 8, 2024
* main:
  web: dark/light theme fixes (#7872)
  web: replace 'description-list' with list of descriptions (#7392)
  web: expressing success (#7830)
  web: fix turnstile types after update (#7854)
  core: bump github.com/google/uuid from 1.4.0 to 1.5.0 (#7866)
  website: bump @types/react from 18.2.43 to 18.2.45 in /website (#7865)
  web: bump wdio-wait-for from 3.0.9 to 3.0.10 in /tests/wdio (#7867)
  website/blog: okta part two blog (#7863)
  web: bump lit-analyzer from 2.0.1 to 2.0.2 in /web (#7858)
  web: bump the babel group in /web with 4 updates (#7856)
  web: bump the eslint group in /web with 2 updates (#7857)
  web: bump rollup from 4.7.0 to 4.8.0 in /web (#7859)
  web: bump the eslint group in /tests/wdio with 2 updates (#7860)
  web: refactor the table renderer for legibility  (#7433)
  documentation: Improve explanation of `kubernetes_json_patches` (#7832)
  root: update security policy to include link to cure53 report (#7853)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants