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

Do not show link to deleted files. #687

Merged
merged 2 commits into from
Jun 28, 2024

Conversation

brunns
Copy link
Contributor

@brunns brunns commented Jun 28, 2024

Context

Where an existing chat references a source file which ha since been deleted, there will be no file to link to.

We'd still like to show the file name for context with the response.

Changes proposed in this pull request

Screenshot 2024-06-28 at 11 26 10

Relevant links

Things to check

  • I have added any new ENV vars in all deployed environments
  • I have tested any code added or changed
  • I have run integration tests

<a class="iai-chat-bubbles__sources-link govuk-link" href="{{ source.url }}">{{ source.original_file_name }}</a>
{% else %}
<p class="iai-chat-bubbles__sources-link">{{ source.original_file_name }}</p>
Copy link
Contributor

Choose a reason for hiding this comment

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

Please can you make this a <span> rather than a <p>?
That will keep the vertical spacing consistent when there are multiple links, and I don't think it needs the paragraph semantic meaning.

Co-authored-by: Kevin Etchells <kevin.etchells@cabinetoffice.gov.uk>
@brunns brunns merged commit c44f80d into main Jun 28, 2024
7 checks passed
@brunns brunns deleted the bugfix/do-not-show-links-to-deleted-files branch June 28, 2024 10:56
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