From 69b30e54318d81cef00e8a07cac9c685a3f63106 Mon Sep 17 00:00:00 2001 From: Melissa Samworth Date: Fri, 7 Jun 2024 19:18:12 -0400 Subject: [PATCH 1/2] self-explanatory --- app/components/Article/Contents.tsx | 2 +- app/components/Article/article.css | 23 +++++++++++++++++++++-- app/components/Chatbot/ChatEntry.tsx | 4 ++-- app/components/Chatbot/chat_entry.css | 3 ++- app/components/Chatbot/index.tsx | 2 +- 5 files changed, 27 insertions(+), 7 deletions(-) diff --git a/app/components/Article/Contents.tsx b/app/components/Article/Contents.tsx index 4e47dff2..cba8c768 100644 --- a/app/components/Article/Contents.tsx +++ b/app/components/Article/Contents.tsx @@ -31,7 +31,7 @@ const addPopup = (e: HTMLElement, id: string, contents: string, mobile?: boolean if (preexisting) return preexisting const popup = document.createElement('div') - popup.className = 'link-popup bordered' + popup.className = 'link-popup bordered small' popup.innerHTML = contents popup.id = id diff --git a/app/components/Article/article.css b/app/components/Article/article.css index a6df4a19..ed5b1d8f 100644 --- a/app/components/Article/article.css +++ b/app/components/Article/article.css @@ -79,6 +79,18 @@ article .contents p { padding-bottom: var(--spacing-32); } +article .contents p:last-child { + padding-bottom: 0; +} + +article .contents li { + padding-bottom: var(--spacing-16); +} + +article .contents li:last-child { + padding-bottom: 0; +} + article .contents img { max-width: 100%; } @@ -91,11 +103,18 @@ article .glossary-entry { article .link-popup { visibility: hidden; opacity: 0; - z-index: 2; + z-index: 4; + position: absolute; + top: 0; + width: 512px; } article .link-popup .footnote { - padding: var(--spacing-24) var(--spacing-24) 0 var(--spacing-24); + padding: var(--spacing-32) var(--spacing-32) 0 var(--spacing-32); +} + +article .footnote-ref { + position: relative; } article .glossary-popup { diff --git a/app/components/Chatbot/ChatEntry.tsx b/app/components/Chatbot/ChatEntry.tsx index 5a6a3af2..f98e8847 100644 --- a/app/components/Chatbot/ChatEntry.tsx +++ b/app/components/Chatbot/ChatEntry.tsx @@ -63,7 +63,7 @@ const UserQuery = ({content}: Entry) => ( ) -const ReferenceSummary = ({title, authors, source, url}: Citation & {titleClass?: string}) => { +const ReferenceSummary = ({title, authors, source, url, titleClass}: Citation & {titleClass?: string}) => { const referenceSources = { arxiv: 'Scientific paper', blogs: 'Blogpost', @@ -88,7 +88,7 @@ const ReferenceSummary = ({title, authors, source, url}: Citation & {titleClass? return (
-
{title}
+
{title}
{' ยท '} diff --git a/app/components/Chatbot/chat_entry.css b/app/components/Chatbot/chat_entry.css index f6a8ef75..1f1ddcb1 100644 --- a/app/components/Chatbot/chat_entry.css +++ b/app/components/Chatbot/chat_entry.css @@ -3,8 +3,9 @@ article.stampy { padding: var(--spacing-40); border-radius: var(--spacing-6); max-width: unset; - margin: var(--spacing-16); margin-left: var(--spacing-56); + margin-bottom: var(--spacing-24); + border-radius: var(--border-radius) } .chat-entry .title { diff --git a/app/components/Chatbot/index.tsx b/app/components/Chatbot/index.tsx index 2261a790..47efb755 100644 --- a/app/components/Chatbot/index.tsx +++ b/app/components/Chatbot/index.tsx @@ -329,7 +329,7 @@ export const Chatbot = ({question, questions, settings}: ChatbotProps) => { ))} -
+
{followups ? ( Date: Fri, 7 Jun 2024 19:24:41 -0400 Subject: [PATCH 2/2] lint --- app/components/Chatbot/ChatEntry.tsx | 8 +++++++- app/components/Chatbot/chat_entry.css | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/components/Chatbot/ChatEntry.tsx b/app/components/Chatbot/ChatEntry.tsx index f98e8847..596de5d7 100644 --- a/app/components/Chatbot/ChatEntry.tsx +++ b/app/components/Chatbot/ChatEntry.tsx @@ -63,7 +63,13 @@ const UserQuery = ({content}: Entry) => (
) -const ReferenceSummary = ({title, authors, source, url, titleClass}: Citation & {titleClass?: string}) => { +const ReferenceSummary = ({ + title, + authors, + source, + url, + titleClass, +}: Citation & {titleClass?: string}) => { const referenceSources = { arxiv: 'Scientific paper', blogs: 'Blogpost', diff --git a/app/components/Chatbot/chat_entry.css b/app/components/Chatbot/chat_entry.css index 1f1ddcb1..8521394f 100644 --- a/app/components/Chatbot/chat_entry.css +++ b/app/components/Chatbot/chat_entry.css @@ -5,7 +5,7 @@ article.stampy { max-width: unset; margin-left: var(--spacing-56); margin-bottom: var(--spacing-24); - border-radius: var(--border-radius) + border-radius: var(--border-radius); } .chat-entry .title {