Blog/Mobile-friendly tables and Components
Created by: zlonko
This closes #5454 (closed) and #5529 (closed). It implements components to abstract common design patterns in the blog. It also makes tables mobile-friendly.
Changelog
- Adds
Alert
,Figure
andTableWrapper
components - Standardize
figure
/figcaption
instances withFigure
component - Implements the following components
Alert
Figure
TableWrapper
Video
YouTube
Notes
-
img
s are converted toFigure
s in https://github.com/sourcegraph/about/pull/5536 to merge into this PR - Opted for a wrapper component around tables because they are often written in Markdown instead of HTML. This allows for some flexibility for our author's preferences. Bootstrap's
table-responsive
utility did not appear to read within the markdown, so the classtable-overflow
was created. - Noting that some tables were difficult to read even when made scrollable on mobile.
- One table on
blog/optimizing-a-code-intel-backend
is changed into a series of figures to make the images more accessible.
Test
- Ensure prettier has standardized the proposed changes.
- Navigate to
blog/a-programmers-guide-to-find-and-replace
or any other blogpost with tables to check that tables are rendered with a horizontal scroll on mobile - Please see that images and videos render as expected on blogposts