From 6599000376bb07d1276b98cc896d8a71a5b1990c Mon Sep 17 00:00:00 2001 From: Vidya Ramakrishnan Date: Wed, 7 Dec 2022 16:22:42 +0530 Subject: [PATCH 1/5] Fill ticket title in the boxoffice form (#1539) --- funnel/views/project.py | 1 + 1 file changed, 1 insertion(+) diff --git a/funnel/views/project.py b/funnel/views/project.py index d5040b0c0..e30ebe02b 100644 --- a/funnel/views/project.py +++ b/funnel/views/project.py @@ -505,6 +505,7 @@ def edit_boxoffice_data(self) -> ReturnView: obj=SimpleNamespace( org=boxoffice_data.get('org', ''), item_collection_id=boxoffice_data.get('item_collection_id', ''), + ticket_title=boxoffice_data.get('ticket_title', ''), allow_rsvp=self.obj.allow_rsvp, ), model=Project, From 954b559c36d03defc570b8929bc7e4556d173994 Mon Sep 17 00:00:00 2001 From: Mitesh Ashar Date: Thu, 8 Dec 2022 11:00:58 +0530 Subject: [PATCH 2/5] Reload dev server on asset manifest.json regeneration. (#1540) --- devserver.py | 1 + 1 file changed, 1 insertion(+) diff --git a/devserver.py b/devserver.py index b8875de5b..75f000660 100755 --- a/devserver.py +++ b/devserver.py @@ -32,6 +32,7 @@ use_debugger=debug_mode, use_evalex=debug_mode, threaded=True, + extra_files=['funnel/static/build/manifest.json'], ) if background_rq: From fe5fe80ad6bfa0af018390deea9821cabfba7a7a Mon Sep 17 00:00:00 2001 From: Vidya Ramakrishnan Date: Fri, 9 Dec 2022 15:57:19 +0530 Subject: [PATCH 3/5] Upate to codemirror 6 for markdown fields (#1541) * Remove importing codemirror from baseframe. Add it to assets. * Styling codemirror heading, list. Add foldgutter option * Fix codemirror in comments page * Styling fixes * Fix cypress tests for new codemirror * Change comment background color * Styling fixes * Remove placeholder pluggin, it was causing a bug in mobile * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- funnel/__init__.py | 15 -- funnel/assets/js/comments.js | 37 ++--- funnel/assets/js/form.js | 6 + funnel/assets/js/submission_form.js | 38 +---- funnel/assets/js/utils/codemirror.js | 61 ++++++++ funnel/assets/js/utils/typeform_embed.js | 15 +- funnel/assets/sass/app.scss | 1 + funnel/assets/sass/comments.scss | 26 ++-- .../assets/sass/components/_codemirror.scss | 93 ++++++++++++ funnel/assets/sass/components/_helper.scss | 140 ------------------ funnel/assets/sass/components/_layout.scss | 2 +- .../assets/sass/components/_typography.scss | 139 +++++++++++++++++ funnel/assets/sass/components/_variable.scss | 2 + funnel/assets/sass/form.scss | 36 ++--- funnel/static/js/scripts.js | 61 -------- funnel/templates/ajaxform.html.jinja2 | 19 ++- funnel/templates/formlayout.html.jinja2 | 14 -- funnel/templates/layout.html.jinja2 | 3 +- funnel/templates/project_comments.html.jinja2 | 4 - funnel/templates/schedule_edit.html.jinja2 | 6 - funnel/templates/session_form.html.jinja2 | 15 ++ funnel/templates/submission.html.jinja2 | 4 - package-lock.json | 13 +- package.json | 1 + tests/cypress/e2e/00_addProfile.cy.js | 2 +- tests/cypress/e2e/02_verifyAdminRoles.cy.js | 2 +- tests/cypress/e2e/03_createProject.cy.js | 2 +- tests/cypress/e2e/06_manageVenue.cy.js | 4 +- tests/cypress/e2e/07_addCFP.cy.js | 2 +- tests/cypress/e2e/08_addSubmission.cy.js | 2 +- tests/cypress/e2e/09_confirmSubmission.cy.js | 2 +- tests/cypress/e2e/19_search.cy.js | 2 +- tests/cypress/e2e/20_postComment.cy.js | 6 +- tests/cypress/e2e/21_postUpdate.cy.js | 4 +- .../cypress/e2e/22_commentSubscription.cy.js | 4 +- 35 files changed, 413 insertions(+), 370 deletions(-) create mode 100644 funnel/assets/js/utils/codemirror.js create mode 100644 funnel/assets/sass/components/_codemirror.scss create mode 100644 funnel/assets/sass/components/_typography.scss diff --git a/funnel/__init__.py b/funnel/__init__.py index 294c78c3a..54edf12e2 100644 --- a/funnel/__init__.py +++ b/funnel/__init__.py @@ -207,21 +207,6 @@ filters='uglipyjs', ), ) -app.assets.register( - 'js_codemirrormarkdown', - Bundle( - assets.require('codemirror-markdown.js'), - output='js/codemirror-markdown.packed.js', - ), -) -app.assets.register( - 'css_codemirrormarkdown', - Bundle( - assets.require('codemirror-markdown-material.css'), - output='css/codemirror-markdown.packed.css', - filters='cssmin', - ), -) # --- Serve static files with Whitenoise ----------------------------------------------- diff --git a/funnel/assets/js/comments.js b/funnel/assets/js/comments.js index 780596858..59ba2c71a 100644 --- a/funnel/assets/js/comments.js +++ b/funnel/assets/js/comments.js @@ -1,6 +1,7 @@ import Vue from 'vue/dist/vue.min'; import ScrollHelper from './utils/scrollhelper'; import Form from './utils/formhelper'; +import codemirrorHelper from './utils/codemirror'; import getTimeago from './utils/getTimeago'; import { userAvatarUI, faSvg, shareDropdown } from './utils/vue_util'; @@ -171,24 +172,20 @@ const Comments = { }, activateForm(action, textareaId, parentApp = app) { if (textareaId) { + const copyTextAreaContent = function (view) { + if (action === parentApp.COMMENTACTIONS.REPLY) { + parentApp.reply = view.state.doc.toString(); + } else { + parentApp.textarea = view.state.doc.toString(); + } + }; this.$nextTick(() => { - const editor = window.CodeMirror.fromTextArea( - document.getElementById(textareaId), - window.Hasgeek.Config.cm_markdown_config + const editorView = codemirrorHelper( + textareaId, + copyTextAreaContent, + window.Hasgeek.Config.saveEditorContentTimeout ); - let delay; - editor.on('change', () => { - clearTimeout(delay); - delay = setTimeout(() => { - editor.save(); - if (action === parentApp.COMMENTACTIONS.REPLY) { - parentApp.reply = editor.getValue(); - } else { - parentApp.textarea = editor.getValue(); - } - }, window.Hasgeek.Config.saveEditorContentTimeout); - }); - editor.focus(); + editorView.focus(); }); } this.pauseRefreshComments(); @@ -343,12 +340,6 @@ const Comments = { $(() => { window.Hasgeek.Comments = function initComments(config) { - $.ajax({ - url: config.codemirrorUrl, - dataType: 'script', - cache: true, - }).done(() => { - Comments.init(config); - }); + Comments.init(config); }; }); diff --git a/funnel/assets/js/form.js b/funnel/assets/js/form.js index 9be567bb4..89ffa0301 100644 --- a/funnel/assets/js/form.js +++ b/funnel/assets/js/form.js @@ -1,5 +1,6 @@ import 'htmx.org'; import Form from './utils/formhelper'; +import codemirrorHelper from './utils/codemirror'; window.Hasgeek.form = ({ autosave, formId, msgElemId }) => { let lastSavedData = $(formId).find('[type!="hidden"]').serialize(); @@ -80,4 +81,9 @@ window.Hasgeek.form = ({ autosave, formId, msgElemId }) => { typingTimer = setTimeout(enableAutoSave, typingWaitInterval); }); } + + $('textarea.markdown:not([style*="display: none"]').each(function enableCodemirror() { + const markdownId = $(this).attr('id'); + codemirrorHelper(markdownId); + }); }; diff --git a/funnel/assets/js/submission_form.js b/funnel/assets/js/submission_form.js index 8a262d9f5..b09d42c6e 100644 --- a/funnel/assets/js/submission_form.js +++ b/funnel/assets/js/submission_form.js @@ -1,9 +1,4 @@ -import { EditorView, placeholder, keymap } from '@codemirror/view'; -import { markdown, markdownLanguage, markdownKeymap } from '@codemirror/lang-markdown'; -import { html } from '@codemirror/lang-html'; -import { closeBrackets } from '@codemirror/autocomplete'; -import { defaultKeymap, history, historyKeymap } from '@codemirror/commands'; -import { defaultHighlightStyle, syntaxHighlighting } from '@codemirror/language'; +import codemirrorHelper from './utils/codemirror'; import initEmbed from './utils/initembed'; import Form from './utils/formhelper'; import SortItem from './utils/sort'; @@ -14,9 +9,6 @@ $(() => { formId, markdownPreviewElem ) { - let textareaWaitTimer; - const debounceInterval = 1000; - function updateCollaboratorsList(responseData, updateModal = true) { if (updateModal) $.modal.close(); if (responseData.message) window.toastr.success(responseData.message); @@ -131,31 +123,11 @@ $(() => { } }); - // Move this functionality to formhelper.js during to full migration to codemirror 6 const markdownId = $(`#${formId}`).find('textarea.markdown').attr('id'); - const extensions = [ - EditorView.lineWrapping, - placeholder('Content'), - closeBrackets(), - history(), - syntaxHighlighting(defaultHighlightStyle), - keymap.of([defaultKeymap, markdownKeymap, historyKeymap]), - markdown({ base: markdownLanguage }), - html(), - ]; - const view = new EditorView({ - doc: $(`#${markdownId}`).val(), - extensions, - dispatch: (tr) => { - view.update([tr]); - $(`#${markdownId}`).val(view.state.doc.toString()); - if (textareaWaitTimer) clearTimeout(textareaWaitTimer); - textareaWaitTimer = setTimeout(() => { - updatePreview(view); - }, debounceInterval); - }, - }); - document.querySelector(`#${markdownId}`).parentNode.append(view.dom); + if ($(`#${markdownId}`).next().hasClass('cm-editor')) { + $(`#${markdownId}`).next().remove(); + } + codemirrorHelper(markdownId, updatePreview); $('#title') .keypress((event) => { diff --git a/funnel/assets/js/utils/codemirror.js b/funnel/assets/js/utils/codemirror.js new file mode 100644 index 000000000..9bc441ae9 --- /dev/null +++ b/funnel/assets/js/utils/codemirror.js @@ -0,0 +1,61 @@ +import { EditorView, keymap } from '@codemirror/view'; +import { markdown, markdownLanguage, markdownKeymap } from '@codemirror/lang-markdown'; +import { html } from '@codemirror/lang-html'; +import { closeBrackets } from '@codemirror/autocomplete'; +import { defaultKeymap, history, historyKeymap } from '@codemirror/commands'; +import { + syntaxHighlighting, + defaultHighlightStyle, + HighlightStyle, + foldGutter, +} from '@codemirror/language'; +import { tags } from '@lezer/highlight'; + +function codemirrorHelper(markdownId, updateFnCallback = '', callbackInterval = 1000) { + let textareaWaitTimer; + + const markdownHighlighting = HighlightStyle.define([ + { tag: tags.heading1, fontWeight: 'bold', class: 'cm-heading1' }, + { tag: tags.heading2, fontWeight: 'bold', class: 'cm-heading2' }, + { tag: tags.heading3, fontWeight: 'bold', class: 'cm-heading3' }, + { tag: tags.heading4, fontWeight: 'bold', class: 'cm-heading4' }, + { tag: tags.heading5, fontWeight: 'bold', class: 'cm-heading5' }, + { tag: tags.list, class: 'cm-list' }, + { tag: tags.link, class: 'cm-link' }, + { tag: tags.monospace, class: 'cm-code' }, + { tag: tags.emphasis, fontWeight: 'bold', class: 'cm-emphasis' }, + { tag: tags.strong, fontWeight: 'bold', class: 'cm-strong' }, + { tag: tags.strikethrough, class: 'cm-strikethrough' }, + ]); + + const extensions = [ + EditorView.lineWrapping, + closeBrackets(), + history(), + foldGutter(), + syntaxHighlighting(markdownHighlighting), + syntaxHighlighting(defaultHighlightStyle), + keymap.of([defaultKeymap, markdownKeymap, historyKeymap]), + markdown({ base: markdownLanguage }), + html(), + ]; + + const view = new EditorView({ + doc: $(`#${markdownId}`).val(), + extensions, + dispatch: (tr) => { + view.update([tr]); + $(`#${markdownId}`).val(view.state.doc.toString()); + if (updateFnCallback) { + if (textareaWaitTimer) clearTimeout(textareaWaitTimer); + textareaWaitTimer = setTimeout(() => { + updateFnCallback(view); + }, callbackInterval); + } + }, + }); + document.querySelector(`#${markdownId}`).parentNode.append(view.dom); + return view; +} + +export default codemirrorHelper; diff --git a/funnel/assets/js/utils/typeform_embed.js b/funnel/assets/js/utils/typeform_embed.js index 24be40468..2a66aeb30 100644 --- a/funnel/assets/js/utils/typeform_embed.js +++ b/funnel/assets/js/utils/typeform_embed.js @@ -16,10 +16,11 @@ const TypeformEmbed = { } return false; }, - addTypeformEmbed(typeformId, parentElem, loadScript) { - if (!$(parentElem).find(`#typeform-${typeformId}`).length) { + addTypeformEmbed(typeformId, anchorTag, parentDiv, loadScript) { + if (!$(parentDiv).find(`#typeform-${typeformId}`).length) { const typeformDiv = `
`; - parentElem.append(typeformDiv); + $(anchorTag).after(typeformDiv); + $(anchorTag).remove(); if (!loadScript) window.tf.load(); } }, @@ -28,7 +29,8 @@ const TypeformEmbed = { $(containerDiv) .find('a') .each(function isTypeformUrl() { - const txt = $(this).attr('href'); + const anchorTag = this; + const txt = $(anchorTag).attr('href'); let urlSplit; let typeformId; let parentDiv; @@ -38,10 +40,9 @@ const TypeformEmbed = { urlSplit = txt.split('/'); typeformId = urlSplit.pop(); typeformId = typeformId.includes('?') ? typeformId.split('?')[0] : typeformId; - parentDiv = $(this).parents(containerDiv); - $(this).remove(); + parentDiv = $(anchorTag).parents(containerDiv); if (typeformId) { - self.addTypeformEmbed(typeformId, parentDiv, loadScript); + self.addTypeformEmbed(typeformId, anchorTag, parentDiv, loadScript); } } }); diff --git a/funnel/assets/sass/app.scss b/funnel/assets/sass/app.scss index 9dfae6c50..9337ba52c 100644 --- a/funnel/assets/sass/app.scss +++ b/funnel/assets/sass/app.scss @@ -20,6 +20,7 @@ @import 'mui/helpers', 'mui/overlay', 'mui/ripple'; @import 'components/variable'; +@import 'components/typography'; @import 'components/helper'; @import 'components/menu'; @import 'components/layout'; diff --git a/funnel/assets/sass/comments.scss b/funnel/assets/sass/comments.scss index cefdab812..ed766460d 100644 --- a/funnel/assets/sass/comments.scss +++ b/funnel/assets/sass/comments.scss @@ -1,4 +1,6 @@ @import 'components/variable'; +@import 'components/typography'; +@import 'components/codemirror'; @media (max-width: 767px) { .post-form-block { @@ -176,20 +178,23 @@ width: calc(100% - 48px); margin: 0; padding: 0; - .CodeMirror { + textarea.field-comment_message { + display: none; + } + .cm-editor { border: 1px solid $mui-primary-color; border-radius: 16px 16px 0 16px; min-height: 56px; padding: $mui-grid-padding; height: auto; - .CodeMirror-sizer { - min-height: 29px !important; + .cm-scroller { + min-height: 29px; } } - .CodeMirror ~ .CodeMirror { - display: none; + .cm-editor ~ .cm-editor { + display: none !important; } - .CodeMirror-focused { + .cm-editor.cm-focused { border: 1px solid #4a90e2; } } @@ -221,20 +226,23 @@ bottom: 0; left: 0; box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.15); - background-color: $mui-bg-color-accent; + background-color: $mui-bg-color-primary; z-index: 1001; margin: 0; + max-height: 100%; + overflow-y: scroll; .mui-form { - .mui-form__fields .CodeMirror { + .mui-form__fields .cm-editor { border: none; border-radius: 0; - background: $mui-bg-color-accent; + background: $mui-bg-color-primary; } } .mui-btn--raised.icon-btn { border-radius: 0; box-shadow: none; padding-bottom: 16px; + background: inherit; } .user { padding-bottom: $mui-grid-padding/2; diff --git a/funnel/assets/sass/components/_codemirror.scss b/funnel/assets/sass/components/_codemirror.scss new file mode 100644 index 000000000..77cb69b16 --- /dev/null +++ b/funnel/assets/sass/components/_codemirror.scss @@ -0,0 +1,93 @@ +.mui-form { + .cm-editor { + border: none; + border-bottom: 1px solid $mui-text-accent; + box-shadow: none; + border-radius: 0; + height: auto; + outline: none; + + .cm-scroller { + font-size: $mui-input-font-size; + font-family: inherit; + line-height: inherit; + color: inherit; + min-height: 6em; + background: $mui-bg-color-primary; + .cm-placeholder { + color: $mui-text-accent; + @extend .mui--text-subhead; + font-family: inherit; + } + .cm-gutters { + background: inherit; + border: none; + } + .cm-heading1 { + @extend .mui--text-headline; + } + .cm-heading2 { + @extend .mui--text-heading; + } + .cm-heading3 { + @extend .mui--text-title; + } + .cm-heading4 { + @extend .mui--text-subhead; + } + .cm-heading5 { + @extend .mui--text-body2; + } + .cm-heading1, + .cm-heading2, + .cm-heading3, + .cm-heading4, + .cm-heading5 { + margin-top: 8px; + margin-bottom: 14px; + font-weight: 700; + display: inline-block; + } + .cm-link { + color: $mui-text-hyperlink; + } + .cm-strikethrough { + text-decoration: line-through; + } + .cm-emphasis, + .cm-strong { + font-weight: 700; + } + .cm-code { + font-family: monospace, monospace; + font-size: $mui-base-font-size; + line-height: $mui-base-line-height; + } + } + } + .cm-editor.cm-focused { + border-color: $mui-primary-color; + outline: none !important; + } +} + +form.mui--bg-accent .cm-editor { + background: $mui-bg-color-accent; +} + +@media (min-width: 768px) { + .mui-form { + .cm-editor { + .cm-scroller { + margin-left: -$mui-grid-padding; + } + } + } + .modal .mui-form { + .cm-editor { + .cm-scroller { + margin-left: 0; + } + } + } +} diff --git a/funnel/assets/sass/components/_helper.scss b/funnel/assets/sass/components/_helper.scss index 29d434ce4..26a49d7d1 100644 --- a/funnel/assets/sass/components/_helper.scss +++ b/funnel/assets/sass/components/_helper.scss @@ -34,96 +34,6 @@ background-color: $mui-bg-color-accent; } -// ============================================================================ -// TYPOGRAPHY -// ============================================================================ - -.mui--text-display3 { - font-weight: 400; - font-size: 64px; - line-height: 85px; -} - -.mui--text-display2 { - font-weight: 400; - font-size: 48px; - line-height: 64px; -} - -.mui--text-display1 { - font-weight: 400; - font-size: 32px; - line-height: 42px; -} - -.mui--text-headline, -h1 { - font-weight: 400; - font-size: 24px; - line-height: 31px; -} - -.mui--text-heading, -h2 { - font-weight: 400; - font-size: 20px; - line-height: 27px; -} - -.mui--text-title, -h3 { - font-weight: 400; - font-size: 18px; - line-height: 27px; -} - -.mui--text-subhead, -h4 { - font-weight: 400; - font-size: 16px; - line-height: 24px; -} - -p.mui--text-body2 { - margin-bottom: 16px; -} - -.mui--text-body2, -h5 { - font-weight: 400; - font-size: 14px; - line-height: 21px; -} - -p.mui--text-body2 { - margin-bottom: 14px; -} - -h6 { - font-weight: 400; - font-size: 12px; - line-height: 18px; -} - -.mui--text-caption { - font-weight: 400; - font-size: 12px; - line-height: 16px; -} - -.mui--text-menu, -.mui--text-button { - font-weight: 400; - font-size: 14px; - line-height: 24px; -} - -.mui--text-body1 { - font-weight: 400; - font-size: 10px; - line-height: 16px; -} - // ============================================================================ // Text transform // ============================================================================ @@ -224,53 +134,3 @@ h6 { .mui-btn.mui--d-block { width: 100%; } - -// ============================================================================ -// Font awesome 5 -// ============================================================================ - -.fa5-icon { - width: 14px; - height: 14px; - fill: currentColor; -} - -.fa5--align-baseline { - position: relative; - top: 0.09em; -} - -.fa5-icon--caption { - width: 12px; - height: 12px; -} - -.fa5-icon--body { - width: 14px; - height: 14px; -} - -.fa5-icon--subhead { - width: 16px; - height: 16px; -} - -.fa5-icon--title { - width: 18px; - height: 18px; -} - -.fa5-icon--heading { - width: 20px; - height: 20px; -} - -.fa5-icon--headline { - width: 24px; - height: 24px; -} - -.fa5-icon--display1 { - width: 32px; - height: 32px; -} diff --git a/funnel/assets/sass/components/_layout.scss b/funnel/assets/sass/components/_layout.scss index 542294f03..4b7a6721a 100644 --- a/funnel/assets/sass/components/_layout.scss +++ b/funnel/assets/sass/components/_layout.scss @@ -303,7 +303,7 @@ blockquote { ul, ol { - padding-left: 30px; + padding-left: $mui-grid-padding; } img { diff --git a/funnel/assets/sass/components/_typography.scss b/funnel/assets/sass/components/_typography.scss new file mode 100644 index 000000000..e29fd2e84 --- /dev/null +++ b/funnel/assets/sass/components/_typography.scss @@ -0,0 +1,139 @@ +// ============================================================================ +// TYPOGRAPHY +// ============================================================================ + +.mui--text-display3 { + font-weight: 400; + font-size: 64px; + line-height: 85px; +} + +.mui--text-display2 { + font-weight: 400; + font-size: 48px; + line-height: 64px; +} + +.mui--text-display1 { + font-weight: 400; + font-size: 32px; + line-height: 42px; +} + +.mui--text-headline, +h1 { + font-weight: 400; + font-size: 24px; + line-height: 31px; +} + +.mui--text-heading, +h2 { + font-weight: 400; + font-size: 20px; + line-height: 27px; +} + +.mui--text-title, +h3 { + font-weight: 400; + font-size: 18px; + line-height: 27px; +} + +.mui--text-subhead, +h4 { + font-weight: 400; + font-size: 16px; + line-height: 24px; +} + +p.mui--text-body2 { + margin-bottom: 16px; +} + +.mui--text-body2, +h5 { + font-weight: 400; + font-size: 14px; + line-height: 21px; +} + +p.mui--text-body2 { + margin-bottom: 14px; +} + +h6 { + font-weight: 400; + font-size: 12px; + line-height: 18px; +} + +.mui--text-caption { + font-weight: 400; + font-size: 12px; + line-height: 16px; +} + +.mui--text-menu, +.mui--text-button { + font-weight: 400; + font-size: 14px; + line-height: 24px; +} + +.mui--text-body1 { + font-weight: 400; + font-size: 10px; + line-height: 16px; +} + +// ============================================================================ +// Font awesome 5 +// ============================================================================ + +.fa5-icon { + width: 14px; + height: 14px; + fill: currentColor; +} + +.fa5--align-baseline { + position: relative; + top: 0.09em; +} + +.fa5-icon--caption { + width: 12px; + height: 12px; +} + +.fa5-icon--body { + width: 14px; + height: 14px; +} + +.fa5-icon--subhead { + width: 16px; + height: 16px; +} + +.fa5-icon--title { + width: 18px; + height: 18px; +} + +.fa5-icon--heading { + width: 20px; + height: 20px; +} + +.fa5-icon--headline { + width: 24px; + height: 24px; +} + +.fa5-icon--display1 { + width: 32px; + height: 32px; +} diff --git a/funnel/assets/sass/components/_variable.scss b/funnel/assets/sass/components/_variable.scss index 30e01ea62..2197c0ee6 100644 --- a/funnel/assets/sass/components/_variable.scss +++ b/funnel/assets/sass/components/_variable.scss @@ -33,3 +33,5 @@ $mui-label-font-color: rgba(0, 0, 0, 0.54); $mui-label-font-size: 12px; $mui-input-font-size: 16px; $xFormLabelLineHeight: 15px; +$mui-base-font-size: 14px; +$mui-base-line-height: 1.5; diff --git a/funnel/assets/sass/form.scss b/funnel/assets/sass/form.scss index d3221b2d3..fadff3bb6 100644 --- a/funnel/assets/sass/form.scss +++ b/funnel/assets/sass/form.scss @@ -3,6 +3,7 @@ @import 'mui/checkbox-and-radio', 'mui/form', 'mui/select', 'mui/textfield'; @import 'components/draggablebox'; @import 'components/switch'; +@import 'components/codemirror'; .form-message { @extend .mui--text-title; @@ -81,6 +82,10 @@ height: 6em; } + textarea.markdown { + display: none; + } + .mui-form__label { position: static; margin: 0 0 $mui-grid-padding/2; @@ -136,12 +141,6 @@ .alert { margin-bottom: $mui-grid-padding; } - - .cm-editor .cm-placeholder { - color: $mui-text-accent; - @include mui-text('subhead'); - font-family: $mui-base-font-family; - } } .mui-form { @@ -157,11 +156,6 @@ transform: none; top: -$mui-grid-padding/4; } - .mui-textfield > .CodeMirror, - .mui-textfield > .cm-editor { - border-bottom: none; - outline: none; - } } } @@ -549,11 +543,6 @@ width: 70%; } -form.mui--bg-accent .CodeMirror, -form.mui--bg-accent .cm-editor { - background: $mui-bg-color-accent; -} - .modal-form { display: none; } @@ -601,17 +590,14 @@ form.mui--bg-accent .cm-editor { top: -14px; } } - #field-body .cm-editor { - min-height: calc(100vh - 110px); - } - textarea.markdown { - display: none; - } - .cm-editor div { - background: $mui-bg-color-primary; - } .markdown-field { position: relative; + .cm-editor { + border-bottom: none !important; + .cm-scroller { + min-height: calc(100vh - 110px) !important; + } + } .mui-form__error { position: absolute; top: 100px; diff --git a/funnel/static/js/scripts.js b/funnel/static/js/scripts.js index a02fc118a..dc961acfd 100644 --- a/funnel/static/js/scripts.js +++ b/funnel/static/js/scripts.js @@ -3,70 +3,9 @@ window.Hasgeek = {}; window.Hasgeek.Config = { defaultLatitude: '12.961443', defaultLongitude: '77.64435000000003', - cm_markdown_config: { - mode: 'gfm', - lineNumbers: false, - theme: 'default', - lineWrapping: true, - autoCloseBrackets: true, - viewportMargin: Infinity, - extraKeys: { - Enter: 'newlineAndIndentContinueMarkdownList', - Tab: false, - 'Shift-Tab': false, - Home: 'goLineLeft', - End: 'goLineRight', - 'Cmd-Left': 'goLineLeft', - 'Cmd-Right': 'goLineRight', - }, - }, - cm_css_config: 'css', - lineNumbers: false, - theme: 'default', - lineWrapping: true, - autoCloseBrackets: true, - matchBrackets: true, - viewportMargin: Infinity, - extraKeys: { - Tab: false, - 'Shift-Tab': false, - Home: 'goLineLeft', - End: 'goLineRight', - 'Cmd-Left': 'goLineLeft', - 'Cmd-Right': 'goLineRight', - }, }; function activate_widgets() { - if (window.CodeMirror) { - // Activate codemirror on all textareas with class='markdown' - $('textarea.markdown:not([style*="display: none"]').each(function () { - var editor = CodeMirror.fromTextArea( - this, - window.Hasgeek.Config.cm_markdown_config - ); - var delay; - editor.on('change', function (instance) { - clearTimeout(delay); - delay = setTimeout(function () { - editor.save(); - }, 300); - }); - }); - - // Activate codemirror on all textareas with class='stylesheet' - $('textarea.stylesheet:not([style*="display: none"]').each(function () { - var editor = CodeMirror.fromTextArea(this, window.Hasgeek.Config.cm_css_config); - var delay; - editor.on('change', function (instance) { - clearTimeout(delay); - delay = setTimeout(function () { - editor.save(); - }, 300); - }); - }); - } - /* Upgrade to jquery 3.6 select2 autofocus isn't working. This is to fix that problem. select2/select2#5993 */ $(document).on('select2:open', function () { diff --git a/funnel/templates/ajaxform.html.jinja2 b/funnel/templates/ajaxform.html.jinja2 index 6af40b0d7..65de82bce 100644 --- a/funnel/templates/ajaxform.html.jinja2 +++ b/funnel/templates/ajaxform.html.jinja2 @@ -27,9 +27,20 @@ {{ widget_ext_scripts(form) }} {% block innerscripts %} - + + + {% endblock innerscripts %} diff --git a/funnel/templates/formlayout.html.jinja2 b/funnel/templates/formlayout.html.jinja2 index 9404c6d21..df0400144 100644 --- a/funnel/templates/formlayout.html.jinja2 +++ b/funnel/templates/formlayout.html.jinja2 @@ -2,9 +2,6 @@ {% block title %}{{ title }}{% endblock title %} {% block layoutheaders %} - {% assets "css_codemirrormarkdown" -%} - - {%- endassets -%} {% endblock layoutheaders %} @@ -19,17 +16,6 @@ {% endblock contentwrapper %} -{% block pagescripts %} - {% assets "js_codemirrormarkdown" -%} - - - {%- endassets -%} -{% endblock pagescripts %} - {% block serviceworker %} {% endblock serviceworker %} diff --git a/funnel/templates/layout.html.jinja2 b/funnel/templates/layout.html.jinja2 index ff8978814..bfe6ad593 100644 --- a/funnel/templates/layout.html.jinja2 +++ b/funnel/templates/layout.html.jinja2 @@ -216,8 +216,7 @@ {%- endfor %} - {#- This block is to include JS assets of the app that are not required on all the pages but has to be included before baseframe bundle(assets "js_all"). - For instance codemirror-markdown-js.js is only required in the formlayout pages. CodeMirror functions are called from baseframe.js, hence it has to be included before baseframe.js #} + {#- This block is to include JS assets of the app that are not required on all the pages but has to be included before baseframe bundle(assets "js_all") #} {% block pagescripts %}{% endblock pagescripts %} {% assets "js_all" -%} diff --git a/funnel/templates/project_comments.html.jinja2 b/funnel/templates/project_comments.html.jinja2 index 1957a8b0f..71d987003 100644 --- a/funnel/templates/project_comments.html.jinja2 +++ b/funnel/templates/project_comments.html.jinja2 @@ -9,9 +9,6 @@ {% block title %}{% trans %}Comments{% endtrans %}{% endblock title %} {%- block pageheaders %} - {% assets "css_codemirrormarkdown" -%} - - {%- endassets -%} {% endblock pageheaders %} @@ -40,7 +37,6 @@ user: {% if current_auth.user -%}{{ { 'fullname': current_auth.user.fullname, 'avatar': current_auth.user.avatar, 'profile_url': current_auth.user.profile_url }|tojson }}{% else %}{}{% endif %}, loginUrl: "{{ url_for('login') }}", lastSeenUrl: {% if subscribed %}{{ last_seen_url|tojson }}{% else %}false{% endif %}, - codemirrorUrl: {% assets "js_codemirrormarkdown" -%}{{ ASSET_URL|tojson }}{%- endassets -%} }; window.Hasgeek.Comments(commentsConfig); diff --git a/funnel/templates/schedule_edit.html.jinja2 b/funnel/templates/schedule_edit.html.jinja2 index c68975031..b69ac5db1 100644 --- a/funnel/templates/schedule_edit.html.jinja2 +++ b/funnel/templates/schedule_edit.html.jinja2 @@ -3,9 +3,6 @@ {% block title %}{% trans %}Schedule{% endtrans %}{% endblock title %} {% block pageheaders %} - {% assets "css_codemirrormarkdown" -%} - - {%- endassets -%} {% assets 'css_fullcalendar' -%} @@ -109,9 +106,6 @@ {% endblock basecontent %} {% block pagescripts %} - {% assets "js_codemirrormarkdown" -%} - - {%- endassets -%} {% endblock pagescripts %} {% block footerscripts %} diff --git a/funnel/templates/session_form.html.jinja2 b/funnel/templates/session_form.html.jinja2 index b30dbb3e0..c41ad6eae 100644 --- a/funnel/templates/session_form.html.jinja2 +++ b/funnel/templates/session_form.html.jinja2 @@ -18,3 +18,18 @@ {{ ajaxform(ref_id=ref_id, request=request, force=false) }} {%- endif %} {% endblock content %} + + +{%- if request_wants.html_fragment %} + + +{%- endif %} diff --git a/funnel/templates/submission.html.jinja2 b/funnel/templates/submission.html.jinja2 index ddbacf88a..6ddce5ec1 100644 --- a/funnel/templates/submission.html.jinja2 +++ b/funnel/templates/submission.html.jinja2 @@ -10,9 +10,6 @@ {% block description %}{{ proposal.description }}{% endblock description %} {%- block pageheaders %} - {% assets "css_codemirrormarkdown" -%} - - {%- endassets -%} {% endblock pageheaders %} @@ -271,7 +268,6 @@ user: {% if current_auth.user -%}{{ { 'fullname': current_auth.user.fullname, 'avatar': current_auth.user.avatar, 'profile_url': current_auth.user.profile_url }|tojson }}{% else %}{}{% endif %}, loginUrl: "{{ url_for('login') }}", lastSeenUrl: {% if proposal.commentset.current_roles.document_subscriber %}{{ proposal.commentset.url_for('update_last_seen_at')|tojson }}{% else %}false{% endif %}, - codemirrorUrl: {% assets "js_codemirrormarkdown" -%}{{ ASSET_URL|tojson }}{%- endassets -%} }; window.Hasgeek.SubmissionInit(); window.Hasgeek.Comments(commentsConfig); diff --git a/package-lock.json b/package-lock.json index a922fdd35..1229968ca 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,6 +15,7 @@ "@codemirror/lang-markdown": "^6.0.2", "@codemirror/language": "^6.2.1", "@codemirror/view": "^6.4.0", + "@lezer/highlight": "^1.1.3", "copy-webpack-plugin": "^11.0.0", "emojionearea": "^3.4.2", "eslint-plugin-cypress": "^2.11.3", @@ -2006,9 +2007,9 @@ } }, "node_modules/@lezer/highlight": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@lezer/highlight/-/highlight-1.1.2.tgz", - "integrity": "sha512-CAun1WR1glxG9ZdOokTZwXbcwB7PXkIEyZRUMFBVwSrhTcogWq634/ByNImrkUnQhjju6xsIaOBIxvcRJtplXQ==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@lezer/highlight/-/highlight-1.1.3.tgz", + "integrity": "sha512-3vLKLPThO4td43lYRBygmMY18JN3CPh9w+XS2j8WC30vR4yZeFG4z1iFe4jXE43NtGqe//zHW5q8ENLlHvz9gw==", "dependencies": { "@lezer/common": "^1.0.0" } @@ -12983,9 +12984,9 @@ } }, "@lezer/highlight": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@lezer/highlight/-/highlight-1.1.2.tgz", - "integrity": "sha512-CAun1WR1glxG9ZdOokTZwXbcwB7PXkIEyZRUMFBVwSrhTcogWq634/ByNImrkUnQhjju6xsIaOBIxvcRJtplXQ==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@lezer/highlight/-/highlight-1.1.3.tgz", + "integrity": "sha512-3vLKLPThO4td43lYRBygmMY18JN3CPh9w+XS2j8WC30vR4yZeFG4z1iFe4jXE43NtGqe//zHW5q8ENLlHvz9gw==", "requires": { "@lezer/common": "^1.0.0" } diff --git a/package.json b/package.json index adba497e2..88b02f76b 100644 --- a/package.json +++ b/package.json @@ -43,6 +43,7 @@ "@codemirror/lang-markdown": "^6.0.2", "@codemirror/language": "^6.2.1", "@codemirror/view": "^6.4.0", + "@lezer/highlight": "^1.1.3", "copy-webpack-plugin": "^11.0.0", "emojionearea": "^3.4.2", "eslint-plugin-cypress": "^2.11.3", diff --git a/tests/cypress/e2e/00_addProfile.cy.js b/tests/cypress/e2e/00_addProfile.cy.js index 78ccde69f..5069b7fd7 100644 --- a/tests/cypress/e2e/00_addProfile.cy.js +++ b/tests/cypress/e2e/00_addProfile.cy.js @@ -14,7 +14,7 @@ describe('Profile', () => { cy.get('#name').type(sponsor.name); cy.get('button[data-cy="form-submit-btn"]').click(); cy.get('#field-description') - .find('.CodeMirror textarea') + .find('.cm-editor .cm-line') .type('sponsor profile', { force: true }); cy.get('button[data-cy="form-submit-btn"]').click(); diff --git a/tests/cypress/e2e/02_verifyAdminRoles.cy.js b/tests/cypress/e2e/02_verifyAdminRoles.cy.js index d12802109..0772853cc 100644 --- a/tests/cypress/e2e/02_verifyAdminRoles.cy.js +++ b/tests/cypress/e2e/02_verifyAdminRoles.cy.js @@ -13,7 +13,7 @@ describe('Profile admin roles', () => { cy.wait(1000); cy.get('a[data-cy-btn="edit-details"]:visible').click(); cy.get('#field-description') - .find('.CodeMirror textarea') + .find('.cm-editor .cm-line') .type(profile.description, { force: true }); cy.get('button[data-cy="form-submit-btn"]').click(); // TODO: After imgee merger, add tests to upload and select image diff --git a/tests/cypress/e2e/03_createProject.cy.js b/tests/cypress/e2e/03_createProject.cy.js index cda35ab72..1af8fad7b 100644 --- a/tests/cypress/e2e/03_createProject.cy.js +++ b/tests/cypress/e2e/03_createProject.cy.js @@ -14,7 +14,7 @@ describe('Project', () => { cy.get('#location').type(project.location); cy.get('#tagline').type(project.tagline); cy.get('#field-description') - .find('.CodeMirror textarea') + .find('.cm-editor .cm-line') .type(project.description, { force: true }); cy.get('button[data-cy="form-submit-btn"]').click(); diff --git a/tests/cypress/e2e/06_manageVenue.cy.js b/tests/cypress/e2e/06_manageVenue.cy.js index 74b819049..5f86e3205 100644 --- a/tests/cypress/e2e/06_manageVenue.cy.js +++ b/tests/cypress/e2e/06_manageVenue.cy.js @@ -20,7 +20,7 @@ describe('Manage project venue', () => { cy.location('pathname').should('contain', '/new'); cy.get('#title').type(venue.venue_title); cy.get('#field-description') - .find('.CodeMirror textarea') + .find('.cm-editor .cm-line') .type(venue.venue_description, { force: true }); cy.get('#address1').type(venue.venue_address1); cy.get('#address2').type(venue.venue_address2); @@ -45,7 +45,7 @@ describe('Manage project venue', () => { cy.location('pathname').should('contain', '/new'); cy.get('#title').type(venue.room.title); cy.get('#field-description') - .find('.CodeMirror textarea') + .find('.cm-editor .cm-line') .type(venue.room.description, { force: true }); cy.get('#bgcolor').clear().type(venue.room.bgcolor); cy.get('button[data-cy="form-submit-btn"]').click(); diff --git a/tests/cypress/e2e/07_addCFP.cy.js b/tests/cypress/e2e/07_addCFP.cy.js index 4b5face66..365c8e92e 100644 --- a/tests/cypress/e2e/07_addCFP.cy.js +++ b/tests/cypress/e2e/07_addCFP.cy.js @@ -16,7 +16,7 @@ describe('Add CFP and labels to project', () => { cy.get('a[data-cy="add-cfp"]').click(); cy.location('pathname').should('contain', '/cfp'); cy.get('#field-instructions') - .find('.CodeMirror textarea') + .find('.cm-editor .cm-line') .type(cfp.instructions, { force: true }); cy.get('button[data-cy="add-cfp"]').click(); cy.get('label.switch-label').click(); diff --git a/tests/cypress/e2e/08_addSubmission.cy.js b/tests/cypress/e2e/08_addSubmission.cy.js index 2bd4b1f3a..c064c03ca 100644 --- a/tests/cypress/e2e/08_addSubmission.cy.js +++ b/tests/cypress/e2e/08_addSubmission.cy.js @@ -68,7 +68,7 @@ describe('Add a new submission', () => { cy.get('[data-cy="post-comment"]').click(); cy.get('[data-cy="new-form"]') - .find('.CodeMirror textarea') + .find('.cm-editor .cm-line') .type(proposal.proposer_note, { force: true }); cy.wait(1000); cy.get('[data-cy="new-form"]').find('[data-cy="submit-comment"]').click(); diff --git a/tests/cypress/e2e/09_confirmSubmission.cy.js b/tests/cypress/e2e/09_confirmSubmission.cy.js index 437163883..ea9bae497 100644 --- a/tests/cypress/e2e/09_confirmSubmission.cy.js +++ b/tests/cypress/e2e/09_confirmSubmission.cy.js @@ -71,7 +71,7 @@ describe('Confirm submission', () => { cy.get('[data-cy="post-comment"]').click(); cy.get('[data-cy="new-form"]') - .find('.CodeMirror textarea') + .find('.cm-editor .cm-line') .type(proposal.comment, { force: true }); cy.wait(1000); cy.get('[data-cy="new-form"]').find('[data-cy="submit-comment"]').click(); diff --git a/tests/cypress/e2e/19_search.cy.js b/tests/cypress/e2e/19_search.cy.js index b078014b0..7bc3a67d5 100644 --- a/tests/cypress/e2e/19_search.cy.js +++ b/tests/cypress/e2e/19_search.cy.js @@ -14,7 +14,7 @@ describe('Test search feature', () => { cy.get('.tab-content__results').find('.card').contains(project.title); cy.get('input[name="q"]').clear().type(profile.title).type('{enter}'); - cy.get('.tabs__item').contains('Profiles').click(); + cy.get('.tabs__item').contains('Accounts').click(); cy.wait('@search'); cy.get('.tab-content__results').find('.card').contains(profile.title); diff --git a/tests/cypress/e2e/20_postComment.cy.js b/tests/cypress/e2e/20_postComment.cy.js index 43b1c65aa..a42c2f723 100644 --- a/tests/cypress/e2e/20_postComment.cy.js +++ b/tests/cypress/e2e/20_postComment.cy.js @@ -25,7 +25,7 @@ describe('Test comments feature', () => { cy.wait(2000); cy.get('[data-cy="post-comment"]').click(); cy.get('[data-cy="new-form"]') - .find('.CodeMirror textarea') + .find('.cm-editor .cm-line') .type(project.comment, { force: true }); cy.wait(1000); cy.get('[data-cy="new-form"]').find('[data-cy="submit-comment"]').click(); @@ -39,7 +39,7 @@ describe('Test comments feature', () => { cy.wait(1000); cy.get('a[data-cy="edit"]').click(); cy.get('[data-cy="edit-form"]') - .find('.CodeMirror textarea') + .find('.cm-editor .cm-line') .type(project.edit_comment, { force: true }); cy.wait(1000); cy.get('[data-cy="edit-form"]').find('[data-cy="edit-comment"]').click(); @@ -48,7 +48,7 @@ describe('Test comments feature', () => { cy.get('a[data-cy="reply"]').click(); cy.get('[data-cy="reply-form"]') - .find('.CodeMirror textarea') + .find('.cm-editor .cm-line') .type(project.reply_comment, { force: true }); cy.wait(1000); cy.get('[data-cy="reply-form"]').find('[data-cy="reply-comment"]').click(); diff --git a/tests/cypress/e2e/21_postUpdate.cy.js b/tests/cypress/e2e/21_postUpdate.cy.js index 92a2f35db..c5eee659e 100644 --- a/tests/cypress/e2e/21_postUpdate.cy.js +++ b/tests/cypress/e2e/21_postUpdate.cy.js @@ -18,7 +18,7 @@ describe('Test updates feature', () => { cy.get('a[data-cy-btn="add-update"]').click(); cy.get('#title').type(project.update_title); cy.get('#field-body') - .find('.CodeMirror textarea') + .find('.cm-editor .cm-line') .type(project.update_body, { force: true }); cy.get('#is_pinned').click(); cy.get('button[data-cy="form-submit-btn"]').click(); @@ -28,7 +28,7 @@ describe('Test updates feature', () => { cy.get('a[data-cy-btn="add-update"]').click(); cy.get('#title').type(project.restricted_update_title); cy.get('#field-body') - .find('.CodeMirror textarea') + .find('.cm-editor .cm-line') .type(project.restricted_update_body, { force: true }); cy.get('#is_restricted').click(); cy.get('button[data-cy="form-submit-btn"]').click(); diff --git a/tests/cypress/e2e/22_commentSubscription.cy.js b/tests/cypress/e2e/22_commentSubscription.cy.js index 4c0bff6af..4c66cb33c 100644 --- a/tests/cypress/e2e/22_commentSubscription.cy.js +++ b/tests/cypress/e2e/22_commentSubscription.cy.js @@ -19,7 +19,7 @@ describe('Confirm submission comment subscription', () => { cy.get(`a[data-cy-proposal="${proposal.title}"]`).click(); cy.get('[data-cy="post-comment"]').click(); cy.get('[data-cy="new-form"]') - .find('.CodeMirror textarea') + .find('.cm-editor .cm-line') .type(proposal.comment_2, { force: true }); cy.wait(1000); cy.get('[data-cy="new-form"]').find('[data-cy="submit-comment"]').click(); @@ -73,7 +73,7 @@ describe('Confirm submission comment subscription', () => { cy.get(`a[data-cy-proposal="${proposal.title}"]`).click(); cy.get('[data-cy="post-comment"]').click(); cy.get('[data-cy="new-form"]') - .find('.CodeMirror textarea') + .find('.cm-editor .cm-line') .type(proposal.comment_3, { force: true }); cy.wait(1000); cy.get('[data-cy="new-form"]').find('[data-cy="submit-comment"]').click(); From 2df92b6bce6db42ab93871586ce13904d12c6c63 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Dec 2022 11:15:11 +0530 Subject: [PATCH 4/5] Bump certifi from 2022.9.24 to 2022.12.7 (#1542) Bumps [certifi](https://github.com/certifi/python-certifi) from 2022.9.24 to 2022.12.7. - [Release notes](https://github.com/certifi/python-certifi/releases) - [Commits](https://github.com/certifi/python-certifi/compare/2022.09.24...2022.12.07) --- updated-dependencies: - dependency-name: certifi dependency-type: indirect ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements.txt | 12 ++++-------- requirements_test.txt | 10 +--------- 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/requirements.txt b/requirements.txt index 07a980419..7a96f4d3e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -56,7 +56,7 @@ cachelib==0.9.0 # via flask-caching cachetools==5.2.0 # via premailer -certifi==2022.9.24 +certifi==2022.12.7 # via # requests # sentry-sdk @@ -176,7 +176,9 @@ geoip2==4.6.0 grapheme==0.6.0 # via baseframe greenlet==2.0.1 - # via -r requirements.in + # via + # -r requirements.in + # sqlalchemy html2text==2020.1.16 # via # -r requirements.in @@ -197,10 +199,6 @@ idna==3.4 # requests # tldextract # yarl -importlib-metadata==5.1.0 - # via - # flask - # markdown isoweek==1.3.3 # via coaster itsdangerous==2.0.1 @@ -516,8 +514,6 @@ wtforms-sqlalchemy==0.3 # via baseframe yarl==1.8.2 # via aiohttp -zipp==3.11.0 - # via importlib-metadata zxcvbn==4.4.28 # via -r requirements.in diff --git a/requirements_test.txt b/requirements_test.txt index 25e1a23e6..9d693c3ea 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -15,7 +15,7 @@ attrs==22.1.0 # trio beautifulsoup4==4.11.1 # via -r requirements_test.in -certifi==2022.9.24 +certifi==2022.12.7 # via # requests # selenium @@ -32,10 +32,6 @@ coveralls==3.3.1 # via -r requirements_test.in docopt==0.6.2 # via coveralls -exceptiongroup==1.0.4 - # via - # pytest - # trio h11==0.14.0 # via wsproto idna==3.4 @@ -115,10 +111,6 @@ soupsieve==2.3.2.post1 # via beautifulsoup4 splinter==0.18.1 # via pytest-splinter -tomli==2.0.1 - # via - # coverage - # pytest tomlkit==0.11.6 # via -r requirements_test.in trio==0.22.0 From b4cb5d884d8d5dd518999dfd1715a382edd0a7a5 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 12 Dec 2022 22:14:50 +0530 Subject: [PATCH 5/5] [pre-commit.ci] pre-commit autoupdate (#1546) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/asottile/pyupgrade: v3.3.0 → v3.3.1](https://github.com/asottile/pyupgrade/compare/v3.3.0...v3.3.1) - [github.com/psf/black: 22.10.0 → 22.12.0](https://github.com/psf/black/compare/22.10.0...22.12.0) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 49ede8395..4af9ab303 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -39,7 +39,7 @@ repos: '--remove-duplicate-keys', ] - repo: https://github.com/asottile/pyupgrade - rev: v3.3.0 + rev: v3.3.1 hooks: - id: pyupgrade args: @@ -72,7 +72,7 @@ repos: additional_dependencies: - toml - repo: https://github.com/psf/black - rev: 22.10.0 + rev: 22.12.0 hooks: - id: black - repo: https://github.com/pre-commit/mirrors-mypy