Upstream: Quick Search Palette, Collapsible Categories, Bugfixes#70
Merged
yutotakano merged 188 commits intocompsoc-edinburgh:masterfrom Nov 26, 2025
Merged
Conversation
update make-feedback-button-more-clear with master
Collapsible categories and subcategories See merge request vseth/sip-com-apps/community-solutions!556
Replace all usage of moment.js with date-fns, cutting ~60kB from bundle size See merge request vseth/sip-com-apps/community-solutions!543
- Redirects away unauthorised users - Renamed some props to accurately reflect their intent/behaviour - Handles /exams/:filename/404 URLs explicitly too, since by default nested Switches don't use the top-level 404 route.
…y with CategoryPage
Create a separate route for exam edit page See merge request vseth/sip-com-apps/community-solutions!544
The double shadow looks kinda ugly. This is probably not intentional, because the <Paper> component by default shouldn't have shadows. It's only because a separate Paper component in a distant parent of <Editor> is changing the shadow value of all children. Issue: mantinedev/mantine#4930
…ent-like box This is more natural UI to convey that comments are collapsed. It also helps when adding a new comment on a collapsed thread, because previously you had no indicator that there were unseen comments that were being replied to. Now, it is visible that there are collapsed comments above your new comment.
…tlining it on focus
Update dependency date-fns to v4 See merge request vseth/sip-com-apps/community-solutions!517
Better commenting UX Closes #326 See merge request vseth/sip-com-apps/community-solutions!521
Refactor away custom Route to a wrapper component instead See merge request vseth/sip-com-apps/community-solutions!541
This reverts merge request !541
Revert "Merge branch 'remove-userroutes' into 'master'" See merge request vseth/sip-com-apps/community-solutions!578
Reduce re-renders in Quick Search Box See merge request vseth/sip-com-apps/community-solutions!580
…ches
Frontend entered an infinite loop in MarkdownText.addMarks when PostgreSQL
decides to return search results from ts_query but doesn't highlight them
when requesting ts_headline with the same query. This seems to happen on
staging/prod databases and could not be replicated locally even when all
data was copied, which leads me to believe it's a locale issue (my laptop
is en_US for reference).
When answer/comment.highlighted_words from the backend is an empty array,
it gets passed as `addMarks(obj, new RegExp([].join("|")))`. The RegExp
instance matches all inputs if constructed with an empty string. This
results in the `while` loop within addMarks to never terminate.
This never happened on the old search page (and only happens on QuickSearch)
since the old search page uses a wrapper component `HighlightedMarkdown`
that checks for this exact case.
We fix the problem in two layers:
- When passing props to MarkdownText, QuickSearchResults checks if the
array is empty and sets the regex prop to `undefined` instead
- Inside addMarks, if anyone accidentally does the same mistake in the
future, we check if the RegExp is an empty match-all and return early.
This prevents any mis-use of MarkdownText directly in the future which can lead to bugs like #386, caused by passing bad regex. By limiting the scope of use to only highlighting an array of strings, (AND checking whether the array is empty and acting accordingly), we limit the blast radius for future developers.
Fix browser freezing when PostgreSQL decides not to highlight any matches Closes #386 See merge request vseth/sip-com-apps/community-solutions!581
Solves the issue with two LoadingOverlay being laid on top of each other (one from HomePage while categories load, one from UserRouteContent while auth loads). Using a non-intrusive loader that doesn't cover the page also paves way for caching the categories and subtly hydrating them once the server responds.
This speeds up the loading of the homepage for returning users and users who are navigating from a different page, since the cached category data will show up immediately after the auth check. Perceived loading times are important to optimize, since the several hundred milliseconds of delay can deter away users. The local storage cache totals to about 25-35 kB assuming UTF-8, and double assuming UTF-16 (I read somewhere that JavaScript may use UTF-16). This is pretty small in the grand scheme of things (browser limit is 5 or 10 Mb, our prod bundle size is 2 Mb, etc). Still, the user can safely disable local storage via their browser preferences and it won't impact the site's functionality -- the cache is only for performance optimization.
Cache the home-page locally, reducing perceived load time See merge request vseth/sip-com-apps/community-solutions!545
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains upstream changes between 2025/10/22 and 2025/11/26.
The specific range is (0c02b3f, 33e6618], where 0c02b3f was the last commit that was merged into BI File Collection as part of #66.
Exhaustive List of Changes
New Features
Bug fixes
Chores
moment.jssince we already havedate-fnsin our dependenciesThe following commits are also included, but are not relevant to us
I listt them here so that it serves as an exhaustive description of all commits that the PR contains when doing git blame etc in the future.
DB Model Changes
documents: Add an integer fieldorderon DocumentFileMerge
I've done a manual merge with our repo. UTs pass and the frontend looks fine. None of the DB model changes affect any of our open PRs.
Thus, if the CI passes, I will merge with full responsibility.