-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
🧹 Journal
: Move Entry
rendering to EntryComponent
#1650
Conversation
632529a
to
e3fd349
Compare
b934994
to
97c1c7a
Compare
1f7e22e
to
06d3df7
Compare
97c1c7a
to
415606a
Compare
Journal
: Entry
links to their Terms
Journal
: Entry
links to their Keywords
37dbae4
to
3668ba5
Compare
6f9a625
to
6ffd6bd
Compare
41de505
to
cc7950d
Compare
Journal
: Entry
links to their Keywords
Journal
: Move Entry
rendering to EntryComponent
- https://github.com/zinc-collective/convene/issues/1566 This refactor allows us to do post-processing of the markdown at the Component level, which has access to the rails URL builders; which should allow us to link to the `Keyword` within the `Entry#body`...
cc7950d
to
cde1583
Compare
Here's where it links to the |
super(*args, **kwargs) | ||
end | ||
|
||
def body_html |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about content_html
not to confuse with the<body>
tag. This might be more consistent with other components that define header/content/footer slots?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I like that! I will do a follow up PR to rename Entry#body
to Entry#content
let(:component) { described_class.new(entry: entry) } | ||
let(:entry) { create(:journal_entry, body: "https://www.google.com @[email protected] #GoodTimes") } | ||
|
||
it { is_expected.to have_link("https://www.google.com", href: "https://www.google.com") } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason you're just testing the link existence and not other strings?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, I could have done some tests to ensure headings have the appropriate ids and such; but this was the thrust of the work I was doing so it's what I focused on.
Journal
: WritingEntries
journal#2This refactor allows us to do post-processing of the markdown at the Component level, which has access to the rails URL builders; which should allow us to link to the
Keyword
within theEntry#body