Skip to content

feat(account): display existing email and phone details - #9483

Merged
vitormattos merged 4 commits into
LibreSign:mainfrom
chirag-gupta7:feat/9473-account-email-phone
Nov 15, 2026
Merged

vitormattos merged 4 commits into
LibreSign:mainfrom
chirag-gupta7:feat/9473-account-email-phone

Conversation

@chirag-gupta7

@chirag-gupta7 chirag-gupta7 commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Closes #9473

Summary

The authenticated LibreSign Account page displays the signed-in user's existing email address and phone number alongside their display name. Values come from the existing Nextcloud-backed OCS account API, so Nextcloud remains the source of truth and LibreSign stores no duplicate identity data.

This is a read-only frontend change: no new backend endpoint, no duplicated identity storage and no changes to certificate or privacy settings.

Changes

  • Fetch account details once on mount from the existing GET /apps/libresign/api/v1/account/me endpoint.
  • Show localized Email and Phone rows in the existing vertically stacked Details section.
  • Show a localized Not provided fallback when either value is absent.
  • Keep a stable loading presentation and show a safe, localized message if the request fails, without exposing server details.
  • Skip the request when there is no authenticated user.
  • Add an accessible, localized Edit contact information link to the signed-in user's Nextcloud personal Contact information settings (/settings/user/profile-contact), generated with generateUrl. The link remains available while loading, for missing values and after a failed request.
  • Keep editing in Nextcloud; LibreSign adds no contact-editing functionality.
  • Add and update Vitest regression tests for present, missing, failed, loading, unauthenticated and settings-link behavior.
  • Add translator context hints for the context-sensitive Account strings.
  • Rebase the branch onto the latest main so the merged test(e2e): prevent policy target selection from closing dialogs #9504 Playwright correction is included.

How to test

  1. Sign in as a user with an email address and phone number configured in Nextcloud.
  2. Open the LibreSign Account page.
  3. Confirm Email and Phone show the Nextcloud values.
  4. Confirm Edit contact information opens Nextcloud's personal contact settings.
  5. Clear the email/phone values and confirm Not provided is shown while the Edit link remains available.
  6. Simulate an account API failure and confirm only the localized fallback message is shown and the rest of the Account page remains usable.

Validation evidence

  • Focused regression/acceptance test — npx vitest run src/tests/views/Account/Account.spec.ts (11 passed)
  • Relevant lint/type/static-analysis checks — targeted ESLint, npm run ts:check, npx stylelint src/views/Account/Account.vue, npm run lint:translator-hints
  • Translator-hint checker tests — npm run test:translator-hints (8 passed)
  • Broader suite required by the changed surface — the Playwright suite requires the Nextcloud-backed environment and GitHub CI
  • CI reviewed — workflows are awaiting maintainer approval

npm run lint cannot run cleanly in the local Windows checkout because its CRLF working tree violates the repository's LF rule; every reported error is a line-ending error and none are in the changed files. Fresh CI is required for Playwright.

UI / Front-end changes

  • Added read-only Email and Phone fields plus a localized Edit contact information link.
  • Screenshots before/after added for user-visible changes.
Before After
Account details before the change Account details after the change

The screenshots are component previews rendered from the real Account component at the PR base and current revision, using the same viewport, crop, theme and synthetic data (Ada Lovelace, ada@example.com, +1234567890). The account API was mocked; they are not screenshots from a running Nextcloud instance.

  • Tested in relevant browsers when applicable
  • Component/unit (Vitest) tests added or updated
  • Accessibility verified when applicable (semantic link, localized accessible name, keyboard focus)
  • Design review approved when applicable
  • Documentation updated when applicable — follow-up in the separate documentation repository

Tasks

  • Display existing Nextcloud email and phone.
  • Handle loading, missing-value, API-error and unauthenticated states.
  • Add Nextcloud personal-settings link.
  • Add translator context hints.
  • Rebase onto main to include the merged Playwright correction.

Checklist

  • I have read and followed the contribution guide.
  • The diff does not contain unrelated refactors or generated changes.
  • Commits follow Conventional Commits where applicable.
  • All commits include the required DCO sign-off.

AI (if applicable)

  • The content of this PR was partially or fully generated using AI

@chirag-gupta7
chirag-gupta7 requested a review from a team as a code owner November 14, 2026 17:03
Copilot AI balanced review requested due to automatic review settings November 14, 2026 17:03

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@chirag-gupta7

Copy link
Copy Markdown
Contributor Author
account-section-loaded

@vitormattos vitormattos left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the contribution, @chirag-gupta7!

What looks good

  • The change reuses the existing Nextcloud account API and keeps Nextcloud as the source of truth.
  • Loading, missing-value, and API-error states are handled appropriately, with relevant tests.
  • The screenshot shows a readable layout that fits the existing Account page.

Requested change: make contact details manageable

Since this page shows the signed-in user's own email and phone number, please add a small, accessible, localized Edit contact information link to the existing Nextcloud personal settings page. This gives users a clear way to update their details without duplicating editing functionality or identity storage in LibreSign.

Scope

  • Keep the current vertically stacked layout.
  • mailto: and tel: actions, as well as additional screenshots, are not required for this self-profile view.
  • User documentation can be handled in a separate follow-up PR.

Once this change is addressed and CI passes, please request a re-review. Thanks!

@chirag-gupta7

Copy link
Copy Markdown
Contributor Author

I'll work on it as soon as tommorow my time, as it's getting pretty late this side of earth
relax

@chirag-gupta7

Copy link
Copy Markdown
Contributor Author

Thanks @vitormattos! I've added the localized Edit contact information link to Nextcloud's personal settings and included regression tests. The existing layout and read-only behavior remain unchanged. The checks are passing now, so this should be ready for another review.

@vitormattos vitormattos left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for addressing the previous feedback.

Before requesting another review, please:

  • Add before/after screenshots directly to the PR description, following the PR template. The existing screenshot appears only in a discussion comment. Please use the same viewport and synthetic test data where possible.
  • Update the PR description to reflect what has been completed. It currently says screenshots will be attached.

The inline comment covers the missing translator context hints. Once these updates are in place and CI finishes, please request another review.

<dd>{{ loadingAccount ? t('libresign', 'Loading …') : phoneNumber }}</dd>
</dl>
<p v-if="currentUser" class="user-contact-edit">
<a :href="contactSettingsUrl">{{ t('libresign', 'Edit contact information') }}</a>

@vitormattos vitormattos Nov 15, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could you add TRANSLATORS context hints for the new context-sensitive strings in this component?

  • Line 26 — Edit contact information: Clarify that this link opens the signed-in user's contact settings in Nextcloud, not an editor inside LibreSign.
  • Lines 86–87 — Not provided: Explain that this is the fallback for an absent email address or phone number.
  • Line 17 — Email and phone details could not be loaded.: Explain that this appears when loading account contact details fails.

Please place each hint immediately above its corresponding t() call, following the Vue/TypeScript syntax in the LibreSign translation guide. Generic Email and Phone labels do not need extra hints.

@vitormattos

Copy link
Copy Markdown
Member

Hi @chirag-gupta7, I checked the failing Playwright run. It times out in footer-policy-hierarchy-ui.spec.ts while selecting a group, rather than in the Account changes.

This test was corrected in #9504, which was merged into main after your branch's base commit. The corrected test has passed in subsequent runs.

Could you please rebase your PR branch onto the latest main?

# From your fork's local clone:
git remote -v

# Only if the upstream remote does not exist:
git remote add upstream https://github.com/LibreSign/libresign.git

git fetch upstream main
git switch feat/9473-account-email-phone
git rebase upstream/main
git push --force-with-lease origin HEAD:feat/9473-account-email-phone

If Git reports conflicts, resolve them, stage the affected files with git add, and run git rebase --continue until the rebase finishes. Before pushing, confirm that origin points to your fork (chirag-gupta7/libresign). The --force-with-lease option is needed after rebasing and protects against overwriting unexpected remote updates.

This should incorporate the Playwright fix and trigger fresh CI checks. If GitHub requires workflow approval again, please let us know.

The separate review requests about translator context hints and before/after screenshots still apply.

Read account.emailAddress and settings.phoneNumber from the existing /api/v1/account/me OCS endpoint. Missing values fall back to a localized label, failures show a safe message, and no request is made without an authenticated user.

Signed-off-by: chirag-gupta7 <chirag15470956@gmail.com>
Add a localized Edit contact information link to the signed-in user's Nextcloud personal settings. Keep it available while loading, for missing values and after a failed account request.

Signed-off-by: chirag-gupta7 <chirag15470956@gmail.com>
Signed-off-by: chirag-gupta7 <chirag15470956@gmail.com>
@chirag-gupta7
chirag-gupta7 force-pushed the feat/9473-account-email-phone branch from 7f800aa to 4519123 Compare November 15, 2026 16:00
@chirag-gupta7

Copy link
Copy Markdown
Contributor Author

Hi @vitormattos! I've rebased the branch onto the latest main, including the #9504 Playwright fix, added the requested TRANSLATORS hints, and updated the PR description with the before/after screenshots.

The updated changes are pushed, but GitHub Actions is currently awaiting maintainer approval. Could you approve the workflows when you get a chance?

Once CI is green, I'll request a re-review. Thanks!

@vitormattos vitormattos left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the updates, @chirag-gupta7! The previous requests regarding the Nextcloud settings link, translator context, screenshots, and rebase have been addressed.

I found one small remaining improvement in Account.vue before final approval.

Could you add TRANSLATORS context hints immediately above both Loading … strings (lines 22 and 24)? Please explain that the ellipsis indicates an operation in progress and should be preserved.

Also, according to the Nextcloud translation guidelines, the Unicode ellipsis (…) should be preceded by a non-breaking space (U+00A0), rather than a regular space (U+0020). Please update both occurrences and their corresponding Vitest assertions.

The Email and Phone labels are already localized, and additional context hints for those labels are optional.

The existing link to Nextcloud's contact settings is acceptable for this PR. Any further navigation or editing UX improvements can be handled separately.

Once these small changes are pushed and Playwright passes, we can proceed with the final review. Thanks!

Signed-off-by: chirag-gupta7 <chirag15470956@gmail.com>
@chirag-gupta7

Copy link
Copy Markdown
Contributor Author

Hi @vitormattos! I've addressed the latest feedback by adding TRANSLATORS hints above both loading messages, using the required non-breaking space before the ellipsis, and updating the Vitest assertions.

The changes are pushed, but GitHub Actions is awaiting maintainer approval again. Could you approve the workflows when convenient?

Once CI passes, the PR should be ready for your final review. Thanks!

@vitormattos
vitormattos disabled auto-merge November 15, 2026 18:32
@vitormattos
vitormattos merged commit 15395f1 into LibreSign:main Nov 15, 2026
63 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Hi @chirag-gupta7, your first pull request to LibreSign has been merged. 🎉

Your work is part of LibreSign now, and everyone who signs a document with it benefits from the time and knowledge you shared. Thank you.

You are very welcome to contribute again. The good first issue list is a good place to look next, and you no longer have to wonder how the process works.

If you have a few minutes and feel like it, we would love to hear how this went for you: https://ls.librecode.coop/index.php/645932?lang=en&source=github-first-merged-pr&repository=libresign. It is entirely optional; nothing is expected of you in return for contributing.

Come say hello in the LibreSign community: https://t.me/LibreSign

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.

Show existing account email and phone information in LibreSign profile

3 participants