Skip to content

Commit

Permalink
Deprecate frontend elements controller
Browse files Browse the repository at this point in the history
This is a very old feature that very likely nobody uses.
Will be removed in Alchemy 8.0
  • Loading branch information
tvdeyen committed Jan 5, 2025
1 parent ce12a5d commit 074e03a
Show file tree
Hide file tree
Showing 7 changed files with 97 additions and 13 deletions.
26 changes: 17 additions & 9 deletions app/assets/builds/alchemy/admin.css

Large diffs are not rendered by default.

18 changes: 17 additions & 1 deletion app/assets/builds/alchemy/admin/print.css
Original file line number Diff line number Diff line change
@@ -1 +1,17 @@
div#main_menu,div#top_menu,div#corner,div#flash_notices,div.pagination span,div.pagination a{display:none}div#archive_all{padding:0}span.icon.true:before{content:"x"}div.pagination{text-align:right}div.pagination em.current{border:none;text-shadow:none}div.pagination em:before{content:"Page "}/*# sourceMappingURL=print.css.map */
/* Error: Can't find stylesheet to import.
* ,
* 1 | @use "../defaults";
* | ^^^^^^^^^^^^^^^^^^
* '
* app/stylesheets/alchemy/admin/print.scss 1:1 root stylesheet */

body::before {
font-family: "Source Code Pro", "SF Mono", Monaco, Inconsolata, "Fira Mono",
"Droid Sans Mono", monospace, monospace;
white-space: pre;
display: block;
padding: 1em;
margin-bottom: 1em;
border-bottom: 2px solid black;
content: "Error: Can't find stylesheet to import.\a \2577 \a 1 \2502 @use \"../defaults\";\a \2502 ^^^^^^^^^^^^^^^^^^\a \2575 \a app/stylesheets/alchemy/admin/print.scss 1:1 root stylesheet";
}
19 changes: 18 additions & 1 deletion app/assets/builds/alchemy/welcome.css

Large diffs are not rendered by default.

19 changes: 18 additions & 1 deletion app/assets/builds/tinymce/skins/content/alchemy/content.min.css
Original file line number Diff line number Diff line change
@@ -1 +1,18 @@
:root{--spacing-0: 2px;--spacing-1: 4px;--spacing-2: 8px;--spacing-3: 12px;--spacing-4: 16px;--spacing-5: 20px;--spacing-6: 24px;--spacing-7: 28px;--spacing-8: 32px;--icon-size-xs: 0.75rem;--icon-size-sm: 0.875rem;--icon-size-1x: 1rem;--icon-size-md: 1.3rem;--icon-size-xl: 1.5rem;--icon-size-xxl: 1.6rem;--font-mono: Menlo, Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal, monospace;--font-sans: "Open Sans", "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Verdana, Tahoma, sans-serif;--font-size_small: 10px;--font-size_medium: 12px;--font-size_large: 16px;--font-weigth_normal: 500;--font-weigth_bold: 700;--border-radius_medium: 3px;--color-blue_very_light: hsl(203deg, 32%, 97%);--color-blue_light: hsl(203deg, 32%, 85%);--color-blue_medium: hsl(212deg, 52%, 36%);--color-blue_dark: hsl(212deg, 52%, 26%);--color-green_very_light: hsl(88deg, 47%, 88%);--color-green_light: hsl(127deg, 25%, 69%);--color-green_medium: hsl(127deg, 25%, 48%);--color-green_dark: hsl(128deg, 32%, 26%);--color-yellow_light: hsl(60deg, 81%, 92%);--color-yellow_medium: hsl(56deg, 68%, 85%);--color-yellow_dark: hsl(56deg, 53%, 29%);--color-orange_medium: hsl(42deg, 100%, 74%);--color-orange_dark: hsl(28deg, 77%, 68%);--color-orange_very_dark: hsl(28deg, 77%, 48%);--color-red_very_light: hsl(0deg, 47%, 88%);--color-red_light: hsl(0deg, 25%, 69%);--color-red_medium: hsl(0deg, 51%, 42%);--color-red_dark: hsl(0deg, 51%, 25%);--color-grey_very_light: hsl(0deg, 0%, 97%);--color-grey_light: hsl(0deg, 0%, 94%);--color-grey_medium: hsl(0deg, 0%, 78%);--color-grey_dark: hsl(0deg, 0%, 40%);--color-grey_very_dark: hsl(0deg, 0%, 20%);--color-white: hsl(0deg, 0%, 100%);--color-text: hsla(224deg, 23%, 26%, 0.8);--color-text_muted: hsla(224deg, 23%, 26%, 0.5);--color-icon: hsla(224deg, 23%, 26%, 0.75)}.alchemy-light{--outline-color: var(--color-orange_dark);--font-color_failed: var(--color-red_medium);--font-color_default: var(--color-text);--tabs_indicator-color: var(--color-orange_dark);--tabs_track-color: var(--color-grey_light);--sl-input-label-color: var(--color-text);--file-upload_background-color: hsla(0deg, 0%, 80%, 0.8);--file-upload_single-upload-background-color: var(--color-grey_light);--file-upload_progress-track-color: var(--color-blue_very_light);--file-upload_progress-indicator-color: var(--color-blue_dark);--file-upload_progress-indicator-color-canceled: hsla(0deg, 0%, 60%, 0.8);--file-upload_progress-indicator-color-failed: var(--color-red_medium);--file-upload_progress-indicator-color-invalid: var(--color-red_medium);--file-upload_progress-indicator-color-successful: var(--color-green_medium);--file-upload_progress-indicator-color-upload-finished: var( --color-blue_dark )}html{font-size:13px}body{font-family:"Open Sans","Lucida Grande","Lucida Sans Unicode","Lucida Sans",Verdana,Tahoma,sans-serif;line-height:1.4;margin:1em;color:var(--color-text)}a{color:var(--color-blue_dark)}table{border-collapse:collapse}table td,table th{border:1px solid rgba(176,176,176,.5);padding:.4rem}figure{display:table;margin:1rem auto}figure figcaption{color:var(--color-grey_dark);display:block;margin-top:.25rem;text-align:center}hr{border-color:rgba(176,176,176,.5);border-style:solid;border-width:1px 0 0 0}code{background-color:var(--color-grey_very_light);border-radius:3px;padding:.1rem .2rem}.mce-content-body:not([dir=rtl]) blockquote{border-left:2px solid rgba(176,176,176,.5);margin-left:1.5rem;padding-left:1rem}.mce-content-body[dir=rtl] blockquote{border-right:2px solid rgba(176,176,176,.5);margin-right:1.5rem;padding-right:1rem}/*# sourceMappingURL=content.min.css.map */
/* Error: Can't find stylesheet to import.
* ,
* 1 | @use "deprecated_variables";
* | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
* '
* app/stylesheets/alchemy/_variables.scss 1:1 @use
* app/stylesheets/tinymce/skins/content/alchemy/content.scss 8:1 root stylesheet */

body::before {
font-family: "Source Code Pro", "SF Mono", Monaco, Inconsolata, "Fira Mono",
"Droid Sans Mono", monospace, monospace;
white-space: pre;
display: block;
padding: 1em;
margin-bottom: 1em;
border-bottom: 2px solid black;
content: "Error: Can't find stylesheet to import.\a \2577 \a 1 \2502 @use \"deprecated_variables\";\a \2502 ^^^^^^^^^^^^^^^^^^^^^^^^^^^\a \2575 \a app/stylesheets/alchemy/_variables.scss 1:1 @use\a app/stylesheets/tinymce/skins/content/alchemy/content.scss 8:1 root stylesheet";
}
19 changes: 18 additions & 1 deletion app/assets/builds/tinymce/skins/ui/alchemy/skin.min.css

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions app/controllers/alchemy/elements_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ class ElementsController < Alchemy::BaseController
# * html
# * js (Tries to replace a given +container_id+ with the elements view partial content via jQuery.)
#
# @deprecated This controller action will be removed in Alchemy 8.0.
def show
Alchemy::Deprecation.warn "The elements#show controller action is deprecated and will be removed in Alchemy 8.0."

@page = @element.page
@options = params[:options]

Expand Down
6 changes: 6 additions & 0 deletions spec/controllers/alchemy/elements_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ module Alchemy
let(:restricted_page) { create(:alchemy_page, :public, restricted: true) }
let(:restricted_element) { create(:alchemy_element, page: restricted_page, name: "download") }

around do |example|
Deprecation.silence do
example.run
end
end

describe "#show" do
it "should render available elements" do
get :show, params: {id: element.id}
Expand Down

0 comments on commit 074e03a

Please sign in to comment.