This week I completed by pull request with some squashing and the changes were merged by my professor. I found that the problem of page re-rendering and losing focus could be solved without using autoFocus
and sacrificing accessibility.
As pointed out by @dukemanh
, the problem can be solved by simply returning a JSX expression in searchInput.tsx
. By doing so, it prevents a new component being returned every time and therefore stops the page from re-rendering unnecessarily. I also removed some fields and attributes that were unnecessary while in AuthorSearchInput.tsx
.
It was a rather messy pull request in the end. I had to squash and rebase my two changes, but had some trouble doing so. I hadn't done much of either in previous pull requests. I am getting better at learning how to squash and rebase with this experience.
It was fun interacting with so many students from Seneca that were interested in solving the same issue. I hope to contribute more to Telescope soon and hopefully not make such a mess with my pull requests in the future!
Top comments (0)