Conversation
b4b0da4 to
1b2def5
Compare
app/views/topics/_list.html.erb
Outdated
| <% @topics.each do |topic| %> | ||
| <tr> | ||
| <td class="text-bold-500"><%= topic.title %></td> | ||
| <td class="text-bold-500"><%= topic.description.truncate(25, omission: "...") %></td> |
There was a problem hiding this comment.
Truncate needs a safe navigation operator. It will throw an undefined method for nil error if description is not provided.
There was a problem hiding this comment.
Our existing tests will catch this if we set only the required fields in the topics factory.
There was a problem hiding this comment.
We also have an errant not-null on description and UID in the schema. Both of those should be optional.
There was a problem hiding this comment.
So should we make description and title nullable?
There was a problem hiding this comment.
I got that in the import branch, so we're good.
There was a problem hiding this comment.
Actually, since this is pulled into another file, we'll need to get it here. I got the migration portion but we'll need to add the save navigation operator before those two truncates. Then I think we're good to go.
|
I've committed JS libraries that were downloaded when I run import map command. |
dcollie2
left a comment
There was a problem hiding this comment.
We just need the &.truncate fixes and we're ready to merge.
* main: Bump selenium-webdriver from 4.28.0 to 4.29.0 Update language.rb chore: annotate models, factories and fixtures chore: introduce annotate gem test: add min length validation for name fix: better spec descriptions Remove calls to simple-datatables WIP Implement topic importer Add old_id to topics for uniqueness and backfill Add old_id to providers for backfilling WIP chore: update net-smtp gem feat: add file_storage_prefix method to language model refactor: remove file_share_folder column from languages fix: provider seeds change logic for sign_in test helper
a706ff3 to
eb926d4
Compare
|
I've force pushed this branch merged with main |
What Issue Does This PR Cover, If Any?
This PR is an addition to the task of topics search.
Let's use full power of Rails 8 and make search work automatically (without submitting form by button click).
What Changed? And Why Did It Change?
Any change of search form input will lead to debounced form submission.
This works through new Stimulus controller.
How Has This Been Tested?
Manually
Please Provide Screenshots
No 'Submit' button, form was submitted after typing:

Additional Comments
turbo_frame_tagdoes not work inside the table, so we cannot wrap only table body and have to wrap the whole tablenet-smtpupdate fixes CI build