Skip to content

Conversation

@omkar-ethz
Copy link
Member

@omkar-ethz omkar-ethz commented Jul 8, 2025

Description

This PR adds an environment variable supportEmail. If set, a card "Questions or issues" is added in the /help page like so:
Screenshot from 2025-07-08 14-55-16

Motivation

Currently, users had no way to look up a contact email in case of issues or questions. This PR adds it via a configurable supportEmail env var.

Fixes:

None

Changes:

Please provide a list of the changes implemented by this PR

  • add supportEmail in appConfig
  • add a card in /help component

Tests included

  • Included for each change/fix?
  • Passing? (Merge will not be approved unless this is checked)

Documentation

  • swagger documentation updated [required]
  • official documentation updated [nice-to-have]

official documentation info

N/A

Backend version

  • Does it require a specific version of the backend
  • which version of the backend is required:

Summary by Sourcery

Add supportEmail configuration and display contextual help cards in the UI

New Features:

  • Introduce supportEmail environment variable in AppConfig
  • Render a “Questions or issues?” card on the /help page when supportEmail is set
  • Render a “Getting help” card on the /about page for PSI facility with optional contact email

@omkar-ethz omkar-ethz requested a review from minottic July 8, 2025 13:03
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @omkar-ethz - I've reviewed your changes - here's some feedback:

  • Consider extracting the support contact card into a shared component instead of duplicating the HTML and logic in both Help and About.
  • Replace the raw "PSI" string check with a constant or enum to avoid typos and improve maintainability when gating the About card.
  • You can remove the wrapping

    tag around the mat-card in help.component.html and apply the *ngIf directly on the mat-card to keep the DOM structure cleaner.

Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider extracting the support contact card into a shared component instead of duplicating the HTML and logic in both Help and About.
- Replace the raw "PSI" string check with a constant or enum to avoid typos and improve maintainability when gating the About card.
- You can remove the wrapping <p> tag around the mat-card in help.component.html and apply the *ngIf directly on the mat-card to keep the DOM structure cleaner.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@omkar-ethz omkar-ethz changed the title (feat) add help cards in /help and /about, based on configurable supportEmail feat: add help cards in /help and /about, based on configurable supportEmail Jul 8, 2025
@minottic
Copy link
Member

minottic commented Jul 9, 2025

what's the idea behind having the email in both places? We should remember to document this once this (reviewed and improved) is in this repo's readme/docs

@omkar-ethz
Copy link
Member Author

what's the idea behind having the email in both places? We should remember to document this once this (reviewed and improved) is in this repo's readme/docs

this was based on Leo's suggestion (that user's might also want to see the support email in about). But i agree the Help page is pretty easy to find, so fine with removing the card from About.

@omkar-ethz
Copy link
Member Author

what's the idea behind having the email in both places? We should remember to document this once this (reviewed and improved) is in this repo's readme/docs

this was based on Leo's suggestion (that user's might also want to see the support email in about). But i agree the Help page is pretty easy to find, so fine with removing the card from About.

I will also create a PR in the current version of the docs once we decide the behavior of supportEmail (whether we keep the card in About or not) - so that when the docs are moved to this repo, this gets included as well.

@minottic
Copy link
Member

this was based on Leo's suggestion (that user's might also want to see the support email in about). But i agree the Help page is pretty easy to find, so fine with removing the card from About.

thx. I also think the /help is enough

@omkar-ethz
Copy link
Member Author

this was based on Leo's suggestion (that user's might also want to see the support email in about). But i agree the Help page is pretty easy to find, so fine with removing the card from About.

thx. I also think the /help is enough

Removed the card in /about. Created a PR in docs: SciCatProject/documentation#81 - unfortunately i don't have permissions to add reviewers or merge. Once this PR is merged, will create a PR in scicat-ci's version of frontend.

Copy link
Member

@minottic minottic left a comment

Choose a reason for hiding this comment

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

thx!

@omkar-ethz omkar-ethz merged commit a8da490 into master Jul 10, 2025
9 checks passed
@omkar-ethz omkar-ethz deleted the help-messages branch July 10, 2025 09:02
omkar-ethz added a commit that referenced this pull request Jul 10, 2025
…rtEmail (#1933)

This PR adds an environment variable `supportEmail`. If set, a card
"Questions or issues" is added in the `/help` page like so:
![Screenshot from 2025-07-08
14-55-16](https://github.com/user-attachments/assets/789f4e20-ee0f-49b3-badf-2ee4f54666e9)

Currently, users had no way to look up a contact email in case of issues
or questions. This PR adds it via a configurable `supportEmail` env var.

None

Please provide a list of the changes implemented by this PR

* add `supportEmail` in appConfig
* add a card in /help component

- [ ] Included for each change/fix?
- [x] Passing? (Merge will not be approved unless this is checked)

- [ ] swagger documentation updated \[required\]
- [x] official documentation updated \[nice-to-have\] SciCatProject/documentation#81

N/A

- [ ] Does it require a specific version of the backend
- which version of the backend is required:

Add supportEmail configuration and display contextual help cards in the
UI

New Features:
- Introduce supportEmail environment variable in AppConfig
- Render a “Questions or issues?” card on the /help page when
supportEmail is set
- Render a “Getting help” card on the /about page for PSI facility with
optional contact email
@omkar-ethz omkar-ethz changed the title feat: add help cards in /help and /about, based on configurable supportEmail feat: add help cards in /help, based on configurable supportEmail Jul 10, 2025
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