Skip to content

Commit

Permalink
#212 Make the modal scrollable
Browse files Browse the repository at this point in the history
  • Loading branch information
braxtonhall committed Jan 12, 2023
1 parent 4cb4522 commit a657320
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
2 changes: 2 additions & 0 deletions src/sass/modal.sass
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ $modal-background-colour: colours.$white
margin-bottom: 0

.better-library-thing-modal-element-container
overflow-y: auto
max-height: 60vh
width: 100%
margin-top: 20px

Expand Down
16 changes: 10 additions & 6 deletions src/ts/content/extensions/util/tagValidation/dialogs/insertTags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,16 @@ const confirm = (tag: string, remainingTags: string[], node: TagRoot | TagTree)
colour: UIColour.GREY,
onClick: async () => resolve(remainingTags.filter((otherTag) => otherTag !== tag)),
},
{
kind: "button",
text: "Deeper",
colour: UIColour.BLUE,
onClick: async () => resolve(insertTagIntoOneOf(tag, remainingTags, node.children)),
},
...(node.children.length // TODO this kinda but better and checking for depth
? [
{
kind: "button" as const,
text: "Deeper",
colour: UIColour.BLUE,
onClick: async () => resolve(insertTagIntoOneOf(tag, remainingTags, node.children)),
},
]
: []),
{kind: "button", text: "Back", colour: UIColour.RED, onClick: async () => resolve(remainingTags)},
],
colour: UIColour.BLUE,
Expand Down

0 comments on commit a657320

Please sign in to comment.