diff --git a/components/form.js b/components/form.js index 77dd3dad..b9580d55 100644 --- a/components/form.js +++ b/components/form.js @@ -167,7 +167,7 @@ export function MarkdownInput ({ label, topLevel, groupClassName, onChange, setH : (
- {meta.value} + {meta.value}
)} diff --git a/components/image.js b/components/image.js index 52c87e72..42e0b0de 100644 --- a/components/image.js +++ b/components/image.js @@ -27,7 +27,7 @@ const IMAGE_CLICK_TO_LOAD_DATA_URI = 'data:image/png;base64,iVBORw0KGgoAAAANSUhE const IMAGE_PROCESSING_DATA_URI = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAABhWlDQ1BJQ0MgcHJvZmlsZQAAKJF9kT1Iw0AcxV9TxQ8qghYUEcxQnSyIijjWKhShQqgVWnUwufQLmjQkKS6OgmvBwY/FqoOLs64OroIg+AHi6uKk6CIl/i8ptIj14Lgf7+497t4BQrXINKstAmi6bSZiUTGVXhU7XtGFAfRhBBMys4w5SYqj5fi6h4+vd2Ge1frcn6NHzVgM8InEEWaYNvEG8cymbXDeJw6yvKwSnxOPm3RB4keuKx6/cc65LPDMoJlMzBMHicVcEytNzPKmRjxNHFI1nfKFlMcq5y3OWrHM6vfkLwxk9JVlrtMcRgyLWIIEEQrKKKAIG2FadVIsJGg/2sI/5PolcinkKoCRYwElaJBdP/gf/O7Wyk5NekmBKND+4jgfo0DHLlCrOM73sePUTgD/M3ClN/ylKjD7SXqloYWOgN5t4OK6oSl7wOUOMPhkyKbsSn6aQjYLvJ/RN6WB/luge83rrb6P0wcgSV3Fb4CDQ2AsR9nrLd7d2dzbv2fq/f0A3Xly0Qz3JtMAAAAGYktHRABdAF0AWtYatQwAAAAJcEhZcwAALiMAAC4jAXilP3YAAAAHdElNRQfnCRcSJTTRrt+BAAAAGXRFWHRDb21tZW50AENyZWF0ZWQgd2l0aCBHSU1QV4EOFwAAHlZJREFUeNrt3WdAFHfCBvCHzlKkL0WKSpUq0hVQUTQxepbEkKaJ6UajxhhBvfe9e+8SI/Y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B23s4CgoKUFFRgfLyMhQVFSE7++IDsy26+1RmznxGxmIgYhOAiBgARMQAICIGABExAIiIAUBEDAAiYgAQEQOAiBgARMQAICIGABExAIiIAUBEDAAiYgAQEQOAiBgARMQAICIGABExAIiIAUBEDAAiYgAQEQOAiBgARMQAICIGABExAIiIAUBEDAAiYgAQEQOAiBgARMQAICIGABEDgIgYAETEACAiBgARMQCIiAFARAwAImIAEBEDgIgYAETEACAiBgARMQCIiAFARAwAImIAEBEDgIgYAETEACAiBgARMQCIiAFARAwAImIAEBEDgIgYAETEACAiBgARMQCIiAFARAwAImIAEBEDgIgYAETEACAiBgARMQCIGABExAAgIgYAETEAiIgBQEQMACJiABARA4CIGABExAAgIgYAETEAiIgBQEQMACJiABARA4CI7iH/Dx1sPbXJe1r1AAAAAElFTkSuQmCC' -export function useImgUrlCache (text, imgproxyUrls) { +export function useImgUrlCache (text, { imgproxyUrls, tab }) { const ref = useRef({}) const [imgUrlCache, setImgUrlCache] = useState({}) const me = useMe() @@ -43,7 +43,7 @@ export function useImgUrlCache (text, imgproxyUrls) { updateCache(url, IMG_CACHE_STATES.LOADED) } else { // don't use image detection by trying to load as an image if user opted-out of loading external images automatically - if (me?.clickToLoadImg) return + if (me?.clickToLoadImg && tab !== 'preview') return // make sure it's not a false negative by trying to load URL as const img = new window.Image() ref.current[url] = img @@ -72,10 +72,10 @@ export function useImgUrlCache (text, imgproxyUrls) { return imgUrlCache } -export function ZoomableImage ({ src, topLevel, srcSet: srcSetObj, ...props }) { +export function ZoomableImage ({ src, topLevel, srcSet: srcSetObj, tab, ...props }) { const me = useMe() const showModal = useShowModal() - const [originalUrlConsent, setOriginalUrlConsent] = useState(!me ? true : !me.clickToLoadImg) + const [originalUrlConsent, setOriginalUrlConsent] = useState(!me || tab === 'preview' ? true : !me.clickToLoadImg) // if there is no srcset obj, image is still processing (srcSetObj === undefined) or it wasn't detected as an image by the worker (srcSetObj === null). // we handle both cases the same as imgproxy errors. const [imgproxyErr, setImgproxyErr] = useState(!srcSetObj) diff --git a/components/text.js b/components/text.js index 88c19b3b..dbeb83b1 100644 --- a/components/text.js +++ b/components/text.js @@ -63,13 +63,13 @@ function Heading ({ h, slugger, noFragments, topLevel, children, node, ...props } // this is one of the slowest components to render -export default memo(function Text ({ topLevel, noFragments, nofollow, imgproxyUrls, children }) { +export default memo(function Text ({ topLevel, noFragments, nofollow, imgproxyUrls, children, tab }) { // all the reactStringReplace calls are to facilitate search highlighting const slugger = new GithubSlugger() const HeadingWrapper = (props) => Heading({ topLevel, slugger, noFragments, ...props }) - const imgUrlCache = useImgUrlCache(children, imgproxyUrls) + const imgUrlCache = useImgUrlCache(children, { imgproxyUrls, tab }) return (
@@ -113,7 +113,7 @@ export default memo(function Text ({ topLevel, noFragments, nofollow, imgproxyUr // if `srcSet` is undefined, it means the image was not processed by worker yet // if `srcSet` is null, image was processed but this specific url was not detected as an image by the worker const srcSet = imgproxyUrls ? (imgproxyUrls[url] || null) : undefined - return + return } // map: fix any highlighted links @@ -141,7 +141,7 @@ export default memo(function Text ({ topLevel, noFragments, nofollow, imgproxyUr // if `srcSet` is undefined, it means the image was not processed by worker yet // if `srcSet` is null, image was processed but this specific url was not detected as an image by the worker const srcSet = imgproxyUrls ? (imgproxyUrls[url] || null) : undefined - return + return } }} remarkPlugins={[gfm, mention, sub, remarkDirective, searchHighlighter]}