Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auth Web - Implements Shared Breadcrumb #1874

Merged
merged 7 commits into from
Jan 12, 2022

Conversation

cameron-eyds
Copy link
Collaborator

Issue #:
bcgov/entity#10236

Description of changes:

  • Imports and implements Shared Breadcrumb
  • Removes Navigation tab bar
  • Updated routes with Meta + Breadcrumb data

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the sbc-auth license (Apache 2.0).

@cameron-eyds cameron-eyds self-assigned this Jan 12, 2022
@codecov
Copy link

codecov bot commented Jan 12, 2022

Codecov Report

Merging #1874 (1663206) into main (f057868) will decrease coverage by 0.00%.
The diff coverage is 53.73%.

@@            Coverage Diff             @@
##             main    #1874      +/-   ##
==========================================
- Coverage   79.14%   79.14%   -0.01%     
==========================================
  Files         283      283              
  Lines        9729     9733       +4     
  Branches      303      304       +1     
==========================================
+ Hits         7700     7703       +3     
- Misses       2029     2030       +1     
Flag Coverage Δ
authweb 43.59% <40.54%> (+0.05%) ⬆️

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

Impacted Files Coverage Δ
auth-api/src/auth_api/exceptions/errors.py 100.00% <ø> (ø)
auth-web/src/components/auth/common/Product.vue 83.33% <ø> (ø)
...mponents/auth/manage-business/EntityManagement.vue 27.27% <ø> (ø)
...c/components/auth/staff/review-task/ProductFee.vue 60.00% <ø> (ø)
auth-web/src/models/Organization.ts 100.00% <ø> (ø)
auth-web/src/services/org.services.ts 3.27% <0.00%> (ø)
auth-web/src/services/payment.services.ts 3.61% <0.00%> (ø)
auth-web/src/store/modules/org.ts 27.53% <12.50%> (ø)
...auth/account-settings/account-info/AccountInfo.vue 54.54% <33.33%> (ø)
auth-api/src/auth_api/services/org.py 87.28% <40.00%> (ø)
... and 16 more

@@ -0,0 +1,69 @@
// Gray Palette
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose we need this file since we didn't build shared component. I think we have to prioritize compiled shared components else we will be duplicating codes. Can we add only those colour codes needed for these components in this file and remove everything else. Else it may change the existing style in sbc-auth

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refactored this to provide an access file for our shared components that imports the theme.file from it's current location.
No changes to original theme files other than add an additional theme colour that has been introduced prior.
app-dk-blue.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated in prior commit

@@ -0,0 +1,19 @@
import { BreadcrumbIF } from '@bcrs-shared-components/interfaces'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this common for all applications? if so we can import from shared components only. We don't have a resources folder yet. Can we use this file inside the util folder for better structure? This will be one file inside folder

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't common for all as of yet.
I believe once the Uber Dashboard or highest level landing/marketing page is complete, we can then then create a common resource. Could look at doing this now though, whatever you prefer.

Copy link
Collaborator Author

@cameron-eyds cameron-eyds Jan 12, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To follow up on this, it will be tricky as until each UI has a set configuration object.
Currently this differs between them.
ie the filings UI refers to Auth Web home as the BUSINESS_URL and auth web refers to itself as AUTH_WEB_URL etc.
So in order to make 1 common resource we would either need..
a) all the configuration objects to follow a standard naming convention
b) have local customization of these resourced objects (which we sort of land us in the same spot we are now anywho)

component: IncorpOrRegisterView,
meta: { showNavBar: false }
meta: {
breadcrumb: [
Copy link
Contributor

@shabeeb-aot shabeeb-aot Jan 12, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will it be better to keep breadcrumb in one place? either in resources file (like in line 213 breadcrumb: [DashboardBreadcrumb]) or inline like this?

Copy link
Collaborator Author

@cameron-eyds cameron-eyds Jan 12, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can be done like that when the crumb is common but each of these routes require a unique to defined.
Not sure exactly what you mean.
Do you want to define all of these in a resource and import into the routes?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think in these cases it's ok in the routes but if we were to re use these specific crumbs it would make sense to make it a resource. I just can't think of where else we would reuse at this time.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In someplace, used as breadcrumb: [DashboardBreadcrumb], and other places using only text from resources (text: HomeBreadCrumb.text). So I was thinking to use one pattern. or even if we are using only text, better to add in the language file and use it in both places. (ie in resource text and HomeBreadCrumb.text). I think its fine now as you mentioned above :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh i see you what you mean, absolutely that makes sense.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
1.0% 1.0% Duplication

@@ -0,0 +1 @@
@import "$assets/scss/theme.scss";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good for now. Once we minify and build @bcrs-shared-components , we can avoid this pattern 👍

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, yea i look forward to learning more about that approach!

@cameron-eyds cameron-eyds merged commit 8b5a399 into bcgov:main Jan 12, 2022
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.

3 participants