Skip to content

Commit

Permalink
Revert "Add ImageWidget with upload/drop/external and inline/widget c…
Browse files Browse the repository at this point in the history
…apabilit…"

This reverts commit 13012ae.
  • Loading branch information
sneridagh authored Jun 22, 2024
1 parent 13012ae commit b0c56f4
Show file tree
Hide file tree
Showing 36 changed files with 502 additions and 1,156 deletions.
1 change: 0 additions & 1 deletion packages/volto-slate/news/5607.feature

This file was deleted.

6 changes: 0 additions & 6 deletions packages/volto-slate/src/editor/less/editor.less
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,6 @@
&.upper {
transform: translateY(-100%);
}

.link-form-container {
margin-left: 5px;
display: flex;
align-items: center;
}
}

.toolbar-wrapper.active {
Expand Down
Binary file removed packages/volto/.storybook/static/halfdome2022.jpeg
Binary file not shown.
8 changes: 4 additions & 4 deletions packages/volto/cypress/tests/core/basic/objectBrowser.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ describe('Object Browser Tests', () => {
cy.getSlate().click();
cy.get('.ui.basic.icon.button.block-add-button').click();
cy.get('.ui.basic.icon.button.image').contains('Image').click();
cy.get('.toolbar-inner button.ui.basic.icon.button').first().click();
cy.get('.toolbar-inner button.ui.basic.icon.button').click();
cy.findByLabelText('Search SVG').click();
cy.get('.ui.input.search').type('/my-page-1');
cy.findByLabelText('Select My Image').dblclick();
Expand All @@ -60,7 +60,7 @@ describe('Object Browser Tests', () => {
cy.getSlate().click();
cy.get('.ui.basic.icon.button.block-add-button').click();
cy.get('.ui.basic.icon.button.image').contains('Image').click();
cy.get('.toolbar-inner button.ui.basic.icon.button').first().click();
cy.get('.toolbar-inner button.ui.basic.icon.button').click();
cy.findByLabelText('Search SVG').click();
cy.window()
.its('env.apiPath')
Expand All @@ -81,7 +81,7 @@ describe('Object Browser Tests', () => {
cy.getSlate().click();
cy.get('.ui.basic.icon.button.block-add-button').click();
cy.get('.ui.basic.icon.button.image').contains('Image').click();
cy.get('.toolbar-inner button.ui.basic.icon.button').first().click();
cy.get('.toolbar-inner button.ui.basic.icon.button').click();
cy.findByLabelText('Search SVG').click();
cy.get('.ui.input.search input').should('be.focused');
});
Expand All @@ -90,7 +90,7 @@ describe('Object Browser Tests', () => {
cy.getSlate().click();
cy.get('.ui.basic.icon.button.block-add-button').click();
cy.get('.ui.basic.icon.button.image').contains('Image').click();
cy.get('.toolbar-inner button.ui.basic.icon.button').first().click();
cy.get('.toolbar-inner button.ui.basic.icon.button').click();
cy.findByLabelText('Search SVG').click();
cy.get('.ui.input.search').type('Searchable');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ describe('New Block Auto Focus Tests', () => {
it('Press Enter on a image block adds new autofocused default block', () => {
cy.addNewBlock('image');
// Timing issues ahead :(
cy.get('.block-editor-image img')
cy.get('.block-editor-image .no-image-wrapper img')
.should('be.visible')
.and(($img) => {
// "naturalWidth" and "naturalHeight" are set when the image loads
Expand Down
3 changes: 1 addition & 2 deletions packages/volto/cypress/tests/core/blocks/blocks-chooser.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ describe('Blocks Tests', () => {
cy.getSlate().click();
cy.get('.ui.basic.icon.button.block-add-button').click();
cy.get('.ui.basic.icon.button.image').contains('Image').click();
cy.get('.toolbar-inner .buttons').first().next().next().click();
cy.get('.ui.input.editor-link.input-anchorlink-theme input').type(
cy.get('.block.image .ui.input input[type="text"]').type(
`https://github.com/plone/volto/raw/main/logos/volto-colorful.png{enter}`,
);
cy.get('#toolbar-save').click();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ describe('ControlPanel: Dexterity Content-Types Layout', () => {
cy.get('#toolbar-add-book').click();
cy.get('.block.title').contains('Book title');
cy.get('.block.slate').contains('About this book');
cy.get('.toolbar-inner .buttons').first().next().next().click();
cy.get('.ui.input.editor-link.input-anchorlink-theme input')
cy.get('.block.image input[type="text"]')
.should('have.attr', 'placeholder')
.and('match', /Book cover image/);
cy.getSlateTitle()
Expand Down
3 changes: 1 addition & 2 deletions packages/volto/cypress/tests/minimal/blocks-image.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ describe('Blocks Tests', () => {
cy.getSlate().click();
cy.get('.ui.basic.icon.button.block-add-button').click();
cy.get('.ui.basic.icon.button.image').contains('Image').click();
cy.get('.toolbar-inner .buttons').first().next().next().click();
cy.get('.ui.input.editor-link.input-anchorlink-theme input').type(
cy.get('.block.image .ui.input input[type="text"]').type(
`https://github.com/plone/volto/raw/main/logos/volto-colorful.png{enter}`,
);
cy.get('#toolbar-save').click();
Expand Down
30 changes: 4 additions & 26 deletions packages/volto/locales/ca/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -498,9 +498,9 @@ msgstr ""
msgid "Browse"
msgstr "Navegui"

#. Default: "Browse the site, drop an image, or use a URL"
#: components/manage/Widgets/ImageWidget
msgid "Browse the site, drop an image, or type a URL"
#. Default: "Browse the site, drop an image, or type an URL"
#: components/manage/Blocks/Image/Edit
msgid "Browse the site, drop an image, or type an URL"
msgstr "Navegueu pel lloc, deixeu anar una imatge o escriviu un URL"

#. Default: "By default, permissions from the container of this item are inherited. If you disable this, only the explicitly defined sharing permissions will be valid. In the overview, the symbol {inherited} indicates an inherited value. Similarly, the symbol {global} indicates a global role, which is managed by the site administrator."
Expand Down Expand Up @@ -624,7 +624,6 @@ msgid "Choose a file"
msgstr "Trieu un fitxer"

#. Default: "Clear"
#: components/manage/AnchorPlugin/components/LinkButton/AddLinkForm
#: components/manage/Blocks/HTML/Edit
msgid "Clear"
msgstr "Clar"
Expand Down Expand Up @@ -2488,7 +2487,6 @@ msgid "Open menu"
msgstr "Obre el menú"

#. Default: "Open object browser"
#: components/manage/AnchorPlugin/components/LinkButton/AddLinkForm
#: components/manage/Widgets/ObjectBrowserWidget
msgid "Open object browser"
msgstr "Obre el navegador d'objectes"
Expand Down Expand Up @@ -3477,11 +3475,6 @@ msgstr ""
msgid "Subject"
msgstr "Assumpte"

#. Default: "Submit"
#: components/manage/AnchorPlugin/components/LinkButton/AddLinkForm
msgid "Submit"
msgstr ""

#. Default: "Success"
#: components/manage/Actions/Actions
#: components/manage/Aliases/Aliases
Expand Down Expand Up @@ -4029,7 +4022,7 @@ msgid "Upload files"
msgstr "Carregueu fitxers"

#. Default: "Uploading image"
#: components/manage/Widgets/ImageWidget
#: components/manage/Blocks/Image/Edit
msgid "Uploading image"
msgstr "S'està carregant la imatge"

Expand Down Expand Up @@ -4579,11 +4572,6 @@ msgstr "El meu nom d'usuari és"
msgid "leadimage"
msgstr "Camp d'imatge principal"

#. Default: "Enter a URL to an image"
#: components/manage/Widgets/ImageWidget
msgid "linkAnImage"
msgstr ""

#. Default: "Listing"
#: config/Blocks
msgid "listing"
Expand Down Expand Up @@ -4678,11 +4666,6 @@ msgstr "altres"
msgid "pending"
msgstr ""

#. Default: "Pick an existing image"
#: components/manage/Widgets/ImageWidget
msgid "pickAnImage"
msgstr ""

#. Default: "Private"
#: components/manage/Contents/ContentsItem
msgid "private"
Expand Down Expand Up @@ -4954,11 +4937,6 @@ msgstr ""
msgid "upgradeVersions"
msgstr ""

#. Default: "Upload an image from your computer"
#: components/manage/Widgets/ImageWidget
msgid "uploadAnImage"
msgstr ""

#. Default: "Input must be valid url (www.something.com or http(s)://www.something.com)"
#: helpers/MessageLabels/MessageLabels
msgid "url"
Expand Down
30 changes: 4 additions & 26 deletions packages/volto/locales/de/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -497,9 +497,9 @@ msgstr "Kaputte Relationen"
msgid "Browse"
msgstr "Durchsuchen"

#. Default: "Browse the site, drop an image, or use a URL"
#: components/manage/Widgets/ImageWidget
msgid "Browse the site, drop an image, or type a URL"
#. Default: "Browse the site, drop an image, or type an URL"
#: components/manage/Blocks/Image/Edit
msgid "Browse the site, drop an image, or type an URL"
msgstr "Seite durchsuchen, Bild ablegen oder URL eingeben"

#. Default: "By default, permissions from the container of this item are inherited. If you disable this, only the explicitly defined sharing permissions will be valid. In the overview, the symbol {inherited} indicates an inherited value. Similarly, the symbol {global} indicates a global role, which is managed by the site administrator."
Expand Down Expand Up @@ -623,7 +623,6 @@ msgid "Choose a file"
msgstr "Datei auswählen"

#. Default: "Clear"
#: components/manage/AnchorPlugin/components/LinkButton/AddLinkForm
#: components/manage/Blocks/HTML/Edit
msgid "Clear"
msgstr "Löschen"
Expand Down Expand Up @@ -2487,7 +2486,6 @@ msgid "Open menu"
msgstr "Menü öffnen"

#. Default: "Open object browser"
#: components/manage/AnchorPlugin/components/LinkButton/AddLinkForm
#: components/manage/Widgets/ObjectBrowserWidget
msgid "Open object browser"
msgstr "Objekt-Browser öffnen"
Expand Down Expand Up @@ -3476,11 +3474,6 @@ msgstr "Gestaltung"
msgid "Subject"
msgstr "Betreff"

#. Default: "Submit"
#: components/manage/AnchorPlugin/components/LinkButton/AddLinkForm
msgid "Submit"
msgstr ""

#. Default: "Success"
#: components/manage/Actions/Actions
#: components/manage/Aliases/Aliases
Expand Down Expand Up @@ -4028,7 +4021,7 @@ msgid "Upload files"
msgstr "Dateien hochladen"

#. Default: "Uploading image"
#: components/manage/Widgets/ImageWidget
#: components/manage/Blocks/Image/Edit
msgid "Uploading image"
msgstr "Bild hochladen"

Expand Down Expand Up @@ -4578,11 +4571,6 @@ msgstr "Mein Nutzername lautet"
msgid "leadimage"
msgstr "Lead-Bild"

#. Default: "Enter a URL to an image"
#: components/manage/Widgets/ImageWidget
msgid "linkAnImage"
msgstr ""

#. Default: "Listing"
#: config/Blocks
msgid "listing"
Expand Down Expand Up @@ -4677,11 +4665,6 @@ msgstr "andere"
msgid "pending"
msgstr "Ausstehend"

#. Default: "Pick an existing image"
#: components/manage/Widgets/ImageWidget
msgid "pickAnImage"
msgstr ""

#. Default: "Private"
#: components/manage/Contents/ContentsItem
msgid "private"
Expand Down Expand Up @@ -4953,11 +4936,6 @@ msgstr "Toggle"
msgid "upgradeVersions"
msgstr "Von Version {origin} zu Version {destination} aktualisieren"

#. Default: "Upload an image from your computer"
#: components/manage/Widgets/ImageWidget
msgid "uploadAnImage"
msgstr ""

#. Default: "Input must be valid url (www.something.com or http(s)://www.something.com)"
#: helpers/MessageLabels/MessageLabels
msgid "url"
Expand Down
30 changes: 4 additions & 26 deletions packages/volto/locales/en/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -492,9 +492,9 @@ msgstr ""
msgid "Browse"
msgstr ""

#. Default: "Browse the site, drop an image, or use a URL"
#: components/manage/Widgets/ImageWidget
msgid "Browse the site, drop an image, or type a URL"
#. Default: "Browse the site, drop an image, or type an URL"
#: components/manage/Blocks/Image/Edit
msgid "Browse the site, drop an image, or type an URL"
msgstr ""

#. Default: "By default, permissions from the container of this item are inherited. If you disable this, only the explicitly defined sharing permissions will be valid. In the overview, the symbol {inherited} indicates an inherited value. Similarly, the symbol {global} indicates a global role, which is managed by the site administrator."
Expand Down Expand Up @@ -618,7 +618,6 @@ msgid "Choose a file"
msgstr ""

#. Default: "Clear"
#: components/manage/AnchorPlugin/components/LinkButton/AddLinkForm
#: components/manage/Blocks/HTML/Edit
msgid "Clear"
msgstr ""
Expand Down Expand Up @@ -2482,7 +2481,6 @@ msgid "Open menu"
msgstr ""

#. Default: "Open object browser"
#: components/manage/AnchorPlugin/components/LinkButton/AddLinkForm
#: components/manage/Widgets/ObjectBrowserWidget
msgid "Open object browser"
msgstr ""
Expand Down Expand Up @@ -3471,11 +3469,6 @@ msgstr ""
msgid "Subject"
msgstr ""

#. Default: "Submit"
#: components/manage/AnchorPlugin/components/LinkButton/AddLinkForm
msgid "Submit"
msgstr ""

#. Default: "Success"
#: components/manage/Actions/Actions
#: components/manage/Aliases/Aliases
Expand Down Expand Up @@ -4023,7 +4016,7 @@ msgid "Upload files"
msgstr ""

#. Default: "Uploading image"
#: components/manage/Widgets/ImageWidget
#: components/manage/Blocks/Image/Edit
msgid "Uploading image"
msgstr ""

Expand Down Expand Up @@ -4573,11 +4566,6 @@ msgstr ""
msgid "leadimage"
msgstr ""

#. Default: "Enter a URL to an image"
#: components/manage/Widgets/ImageWidget
msgid "linkAnImage"
msgstr ""

#. Default: "Listing"
#: config/Blocks
msgid "listing"
Expand Down Expand Up @@ -4672,11 +4660,6 @@ msgstr ""
msgid "pending"
msgstr ""

#. Default: "Pick an existing image"
#: components/manage/Widgets/ImageWidget
msgid "pickAnImage"
msgstr ""

#. Default: "Private"
#: components/manage/Contents/ContentsItem
msgid "private"
Expand Down Expand Up @@ -4948,11 +4931,6 @@ msgstr ""
msgid "upgradeVersions"
msgstr ""

#. Default: "Upload an image from your computer"
#: components/manage/Widgets/ImageWidget
msgid "uploadAnImage"
msgstr ""

#. Default: "Input must be valid url (www.something.com or http(s)://www.something.com)"
#: helpers/MessageLabels/MessageLabels
msgid "url"
Expand Down
Loading

0 comments on commit b0c56f4

Please sign in to comment.