-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[PM-11926] - send created redirect #11140
Conversation
New Issues
Fixed Issues
|
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## main #11140 +/- ##
==========================================
- Coverage 35.16% 33.27% -1.90%
==========================================
Files 2719 2727 +8
Lines 84928 85182 +254
Branches 16160 16222 +62
==========================================
- Hits 29868 28341 -1527
- Misses 54082 54586 +504
- Partials 978 2255 +1277 ☔ View full report in Codecov by Sentry. |
await this.addEditFormService.saveSend(this.updatedSendView, this.file, this.config); | ||
|
||
const sendView = await this.addEditFormService.saveSend( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is likely due to a resolved merge conflict. We don't want to save the send twice. I think the const sendView =
needs to be moved up and this saveSend-call can be removed.
slot="header" | ||
[pageTitle]="'createdSend' | i18n" | ||
showBackButton | ||
[backAction]="close.bind(this)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⛏️ This can just be close
[backAction]="close.bind(this)" | |
[backAction]="close" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@djsmith85 Binding to the current context is required here, otherwise the popup header component will attempt to call this.close
which doesn't exist in PopupHeaderComponent
. There's a similar implementation here.
@@ -135,11 +135,12 @@ export class SendApiService implements SendApiServiceAbstraction { | |||
return this.apiService.send("DELETE", "/sends/" + id, null, true, false); | |||
} | |||
|
|||
async save(sendData: [Send, EncArrayBuffer]): Promise<any> { | |||
async save(sendData: [Send, EncArrayBuffer]): Promise<SendData> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
send-api.service.abstraction
…endCreated component
…ent-specific component
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated the model being used to bubble up after calling save.
I have split the save and navigation part and use events to differ between create and update. The navigation (back or to the send-created-page) has been moved out of the shared component into the client-specific send-add-edit.component. The idea being that we later implement this component on web and desktop. The only thing I haven't found a great solution for is the back-navigation of the send-created page. This will need to be refactored at a later point.
Either find a way to wire up a send-create-close event and use the send-add-edit.component to take care of the navigation
or
The send-created page is slimmed down to it's body and the send-add-edit.component.html includes it under a conditional. That would mean though that it would also need to change the header and take care of the new buttons shown in the footer 🤷
Merging this, to continue testing, but will need more work to make it a fully shareable component across all clients.
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-11926
📔 Objective
This PR adds a redirect to the send created page after successfully creating a send as part of the extension refresh.
📸 Screenshots
Note: in the video the icon in the send-created page isn't rendering properly because of the new tw
art
prefix classes that will be added along with the extension refresh.Screen.Recording.2024-09-18.at.3.09.30.PM.mov
⏰ Reminders before review
🦮 Reviewer guidelines
:+1:
) or similar for great changes:memo:
) or ℹ️ (:information_source:
) for notes or general info:question:
) for questions:thinking:
) or 💭 (:thought_balloon:
) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion:art:
) for suggestions / improvements:x:
) or:warning:
) for more significant problems or concerns needing attention:seedling:
) or ♻️ (:recycle:
) for future improvements or indications of technical debt:pick:
) for minor or nitpick changes