From 9a8594d56084ba8120f6a485bdd3feadd777d94d Mon Sep 17 00:00:00 2001 From: Nick Date: Thu, 21 Nov 2024 01:26:54 -0600 Subject: [PATCH] feat: added tooltips and changed some formatting --- frontend/src/Config/Format.elm | 2 ++ .../Arguments/Philosophy/ColonizingNature.elm | 2 +- .../Arguments/Philosophy/EfilismPatrolSquad.elm | 4 ++-- frontend/src/Debate/Helpers.elm | 17 ++++++++--------- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/frontend/src/Config/Format.elm b/frontend/src/Config/Format.elm index 146eff5..b744b2c 100755 --- a/frontend/src/Config/Format.elm +++ b/frontend/src/Config/Format.elm @@ -192,6 +192,8 @@ myTooltip str = { offset = ( 0, 3 ), blur = 6, size = 0, color = rgba 0 0 0 0.32 } ] (text str) + |> el [ F.color colourTheme.nonHighlightedText, F.regular, F.size 14 ] + tooltip : (Element msg -> Attribute msg) -> Element Never -> Attribute msg tooltip usher tooltip_ = diff --git a/frontend/src/Debate/Arguments/Philosophy/ColonizingNature.elm b/frontend/src/Debate/Arguments/Philosophy/ColonizingNature.elm index 292af3d..65850be 100755 --- a/frontend/src/Debate/Arguments/Philosophy/ColonizingNature.elm +++ b/frontend/src/Debate/Arguments/Philosophy/ColonizingNature.elm @@ -5,7 +5,7 @@ import Debate.Types exposing (..) argumentColonizingNature : Argument argumentColonizingNature = - { argumentTitle = "Argument for the Non-Violence Displacement of Nature" + { argumentTitle = "Argument for the Non-Violent Displacement of Nature" , propositionTitle = "We are justified in displacing nature into non-existence" , propositionReductio = "" , propositionSummary = "Summary" diff --git a/frontend/src/Debate/Arguments/Philosophy/EfilismPatrolSquad.elm b/frontend/src/Debate/Arguments/Philosophy/EfilismPatrolSquad.elm index 9fd29fb..779e7a8 100755 --- a/frontend/src/Debate/Arguments/Philosophy/EfilismPatrolSquad.elm +++ b/frontend/src/Debate/Arguments/Philosophy/EfilismPatrolSquad.elm @@ -7,8 +7,8 @@ argumentEfilismPatrolSquad : Argument argumentEfilismPatrolSquad = { argumentTitle = "The Eternal Intergalactic Sentience Patrol Squad" , propositionTitle = "Efilists are committed to pragmatic natalism." - , propositionReductio = "" - , propositionSummary = "Summary" + , propositionReductio = "Efilists fundamentally believe that sentient life is inherently characterized by suffering and that the most ethical action is to prevent the creation of any new sentient beings, ultimately aiming to completely eliminate all conscious life in the universe to end suffering permanently." + , propositionSummary = "If efilists follow their own logic to its ultimate conclusion, they would paradoxically be committed to a form of pragmatic natalism - the very opposite of their core philosophical stance." , proofLink = "https://www.umsu.de/trees/#(P~5Q),(~3Q),(~3P~1R~5~3S),(R),(~3S~5W)|=(W)" , definitionTable = [ { definiendum = "P" diff --git a/frontend/src/Debate/Helpers.elm b/frontend/src/Debate/Helpers.elm index 4f448b9..3d0a687 100755 --- a/frontend/src/Debate/Helpers.elm +++ b/frontend/src/Debate/Helpers.elm @@ -35,9 +35,9 @@ argumentMaker argument = (\premiseIndex premiseWithNotation -> column argumentFormatting [ paragraph paragraphHightlightedBoldText - [ text ("P" ++ String.fromInt (premiseIndex + 1) ++ ") ") + [ text ("P" ++ String.fromInt (premiseIndex + 1) ++ ")") , text premiseWithNotation.premise - |> el [ F.color colourTheme.nonHighlightedText, F.regular ] + |> el [ F.color colourTheme.nonHighlightedText, F.regular, paddingEach { top = 0, right = 0, bottom = 0, left = 5 } ] ] , paragraph argumentFormatting [ text premiseWithNotation.notation @@ -48,9 +48,9 @@ argumentMaker argument = argumentEntry.premises ++ [ column argumentFormatting [ paragraph paragraphHightlightedBoldText - [ text ("C" ++ String.fromInt (index + 1) ++ ") ") + [ text "C)" , text argumentEntry.conclusion - |> el [ F.color colourTheme.nonHighlightedText, F.regular ] + |> el [ F.color colourTheme.nonHighlightedText, F.regular, paddingEach { top = 0, right = 0, bottom = 0, left = 5 } ] ] , paragraph argumentFormatting [ text argumentEntry.conclusionNotation @@ -73,13 +73,12 @@ argumentMaker argument = [ column [ E.alignTop, E.alignLeft ] [ paragraph (paragraphBoldFormat ++ [ F.size 18, E.width <| px 100 ]) - [ text "Reductio:" |> el [ F.color colourTheme.highlightText ] + [ el [ tooltip below (myTooltip "This is the position from which the reductio ad absurdum is derived.") ] (text "Reductio:") |> el [ F.color colourTheme.highlightText ] ] ] , column [ E.width fill, E.alignLeft ] [ paragraph [] [ text reductio |> el [ F.color colourTheme.nonHighlightedText, F.regular, F.size 16 ] - , el [ tooltip below (myTooltip "These are the propositions from which the reductio ad absurdum is derived") ] (text " Ⓘ") |> el [ F.color colourTheme.nonHighlightedText, F.regular, F.size 16 ] ] ] ] @@ -98,7 +97,7 @@ argumentMaker argument = [ column [ E.alignTop, E.alignLeft ] [ paragraph (paragraphBoldFormat ++ [ F.size 18, E.width <| px 100 ]) - [ text "Proposition:" |> el [ F.color colourTheme.highlightText ] ] + [ el [ tooltip below (myTooltip "A proposition is a declarative statement that can be evaluated as either true or false, and which serves as the basis for debate.") ] (text "Proposition:") |> el [ F.color colourTheme.highlightText ] ] ] , column [ E.width fill, E.alignLeft ] @@ -109,14 +108,14 @@ argumentMaker argument = [ column [ E.alignTop, E.alignLeft ] [ paragraph (paragraphBoldFormat ++ [ F.size 18, E.width <| px 100 ]) - [ text "Summary:" |> el [ F.color colourTheme.highlightText ] + [ el [ tooltip below (myTooltip "The following information provides additional context and insight into the reasoning behind the argument") ] (text "Summary:") |> el [ F.color colourTheme.highlightText ] ] ] , column [ E.width fill, E.alignLeft ] [ paragraph (paragraphBoldFormat ++ [ F.size 18 ]) [ text argument.propositionSummary |> el [ F.color colourTheme.nonHighlightedText, F.regular, F.size 16 ] ] ] ] - , wrappedRow (paragraphBoldFormat ++ [ E.alignLeft ]) + , wrappedRow (paragraphBoldFormat ++ [ E.alignLeft, E.width fill ]) [ E.table [ spacing 0 , D.rounded 10