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

[PM-11899] - send text details component #11002

Merged
merged 15 commits into from
Sep 18, 2024
Merged

[PM-11899] - send text details component #11002

merged 15 commits into from
Sep 18, 2024

Conversation

jaasen-livefront
Copy link
Collaborator

@jaasen-livefront jaasen-livefront commented Sep 11, 2024

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-11899

📔 Objective

This PR adds the send text details component with a corresponding send details and base send component to allow shared use of the logic and structure for the upcoming send file details component. This is one of three PRs for the new create send UI as part of the extension refresh. Credit goes to @djsmith85 for helping set this up.

📸 Screenshots

New Edit
Screenshot 2024-09-11 at 3 04 35 PM Screenshot 2024-09-11 at 3 04 07 PM

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 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

Copy link

codecov bot commented Sep 11, 2024

Codecov Report

Attention: Patch coverage is 0% with 86 lines in your changes missing coverage. Please review.

Please upload report for BASE (main@1b7bb01). Learn more about missing BASE report.
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...onents/send-details/base-send-details.component.ts 0.00% 41 Missing ⚠️
...onents/send-details/send-text-details.component.ts 0.00% 21 Missing ⚠️
.../components/send-details/send-details.component.ts 0.00% 19 Missing ⚠️
...ibs/common/src/tools/send/services/send.service.ts 0.00% 2 Missing ⚠️
...ui/src/send-form/components/send-form.component.ts 0.00% 2 Missing ⚠️
...rc/send-form/services/default-send-form.service.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #11002   +/-   ##
=======================================
  Coverage        ?   34.96%           
=======================================
  Files           ?     2701           
  Lines           ?    84282           
  Branches        ?    16016           
=======================================
  Hits            ?    29472           
  Misses          ?    53841           
  Partials        ?      969           

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

Copy link
Contributor

github-actions bot commented Sep 12, 2024

Logo
Checkmarx One – Scan Summary & Detailsa01aa053-1444-412c-ac8e-6eeed72177bb

No New Or Fixed Issues Found

Copy link
Contributor

@djsmith85 djsmith85 left a comment

Choose a reason for hiding this comment

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

Only a partial review

As discussed I'm uncertain about the changes to the send and sendApi services, which we should likely revert and focus this PR on the UI changes. If it breaks saving Sends on the feature-flagged part, we should fix it in a separate PR.

@@ -23,6 +23,7 @@ export function extensionRefreshSwap(
defaultComponent,
refreshedComponent,
async () => {
return true;
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Please remove this. This was only added it for easier development, but should never be merged.

@@ -26,6 +26,7 @@ export class SendView implements View {
password: string = null;
disabled = false;
hideEmail = false;
hideText = false;
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Did this get added by mistake and you wanted to use SendView.text.hidden instead, as done within the component?

@jaasen-livefront
Copy link
Collaborator Author

jaasen-livefront commented Sep 17, 2024

Only a partial review

As discussed I'm uncertain about the changes to the send and sendApi services, which we should likely revert and focus this PR on the UI changes. If it breaks saving Sends on the feature-flagged part, we should fix it in a separate PR.

Sounds good. The type changes were only a narrowing of types so reverting back to any won't cause any issues.

Comment on lines 2242 to 2245
"textHiddenByDefault": {
"message": "When accessing the Send, hide the text by default",
"description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated."
},
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Message key is not used anywhere and is duplicated by hideTextByDefault which is used.

Copy link
Contributor

Choose a reason for hiding this comment

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

Addressed with efffcc6

Comment on lines 2249 to 2265
"limitSendViews": {
"message": "Limit views"
},
"limitSendViewsHint": {
"message": "No one can view this Send after the limit is reached.",
"description": "Displayed under the limit views field on Send"
},
"limitSendViewsHintWithCount": {
"message": "No one can view this Send after the limit is reached. $ACCESSCOUNT$ views left",
"description": "Displayed under the limit views field on Send",
"placeholders": {
"accessCount": {
"content": "$1",
"example": "2"
}
}
},
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ These message keys are not used anywhere. Need to be removed. Likely will be introduced with the send-options component

Copy link
Contributor

Choose a reason for hiding this comment

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

Addressed with efffcc6

<bit-form-field>
<bit-label>{{ "sendTypeTextToShare" | i18n }}</bit-label>
<textarea bitInput id="text" rows="6" formControlName="text"></textarea>
<bit-hint>{{ "sendTextDesc" | i18n }}</bit-hint>
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ The hint is not included within the latest design.

Copy link
Contributor

Choose a reason for hiding this comment

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

Addressed with 6c7ad7c

Copy link
Contributor

@djsmith85 djsmith85 left a comment

Choose a reason for hiding this comment

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

@jaasen-livefront Addressed some minor issues myself and this is now ready to merge.

@djsmith85 djsmith85 merged commit f8fc626 into main Sep 18, 2024
60 of 62 checks passed
@djsmith85 djsmith85 deleted the PM-11899 branch September 18, 2024 12:04
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