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

[#1005] Preparation work before adding indivdual attachment prominence #7324

Merged
merged 5 commits into from
Oct 3, 2022

Conversation

gbp
Copy link
Member

@gbp gbp commented Sep 26, 2022

Relevant issue(s)

Connected to #1005

What does this do?

  1. Made changes to app/views/request/_bubble.html.erb partial, now assumed it will be passed an incoming message (instead of also handling outgoing messages).
  2. Refactors anchors to incoming/outgoing messages
  3. Adds anchors for attachments so these can be linked to from the admin UI

Why was this needed?

These changes will makes the changes required for #1005 smaller and simpler to review.

Copy link
Member

@garethrees garethrees left a comment

Choose a reason for hiding this comment

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

Looks good in principle.

Couple of small suggestions, but one breakage that probably needs a fix.

app/views/request/_incoming_correspondence.html.erb Outdated Show resolved Hide resolved
app/helpers/link_to_helper.rb Show resolved Hide resolved
app/helpers/link_to_helper.rb Show resolved Hide resolved
@gbp gbp force-pushed the 1005-prep-for-attachment-prominence branch from 363c9e1 to 0b630ce Compare September 27, 2022 11:01
@gbp gbp requested a review from garethrees September 27, 2022 11:02
gbp added 5 commits October 3, 2022 14:09
Fix:
- Hash styling
The message body is passed through `simple_format` which, by defualt
wraps in a `p` tag. Changes the surrounding tag to a `div` to prevent
invalid HTML.
The bubble partial is mainly used to render incoming message attachments
so if we don't use this for outgoing messages we can simplify rendering.

The only useful element for outgoing messages is the correspondence
container, this has been extracted out from the partial.
In helpers and views when linking to incoming or outgoing messages we
manually generate anchors fragments. With minor changes we can replace
the manual anchors with the `dom_id` helper.
@gbp gbp force-pushed the 1005-prep-for-attachment-prominence branch from 0b630ce to 9eb2ee5 Compare October 3, 2022 13:09
@gbp gbp merged commit 52d87ff into develop Oct 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants