-
-
Notifications
You must be signed in to change notification settings - Fork 315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use Rails standards for deleting pages from EssencePage #1833
Conversation
Rails offers ways for setting relations, let's use them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice, thanks 👌 Would you mind to put the essence node fix into here as well?
I've opened a separate PR for that. If we want to backport this, merging with the essence node fix is bad because essencenodes aren't present in Alchemy 4.5. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much better. Thanks
commit 8432864 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu Jun 25 13:40:41 2020 +0200 Bump version to 5.0.0.beta2 commit afd7319 Merge: 5bdf08a 9565b37 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue Jun 23 14:06:21 2020 +0200 Merge pull request AlchemyCMS#1884 from mamhoff/allow-page-factory-with-host-app-locale Language Factory: Create default language in host app's locale commit 9565b37 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Tue Jun 23 11:53:00 2020 +0200 Reload before checking for related EssenceNodes The most recent version of AwesomeNestedSet stops reloading `self` when saving. This leads to `self` having inaccurate values for `lft` and `rgt` in our spec, making `node.self_and_descendants` sometimes not find all children. Luckily our specs found this. commit 36ee497 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Tue Jun 23 10:46:07 2020 +0200 Create default language in host app's locale Our default language factory will create a page in German. That's not great for apps that do not have German as an `available_locale`, as Alchemy now validates the language_code of the language. This change adds a new trait "german" to satisfy our existing test suite, but creates by default a language in the host apps first available locale. commit 5bdf08a Merge: f637e02 bb645db Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue Jun 23 12:59:38 2020 +0200 Merge pull request AlchemyCMS#1883 from AlchemyCMS/depfu/update/factory_bot_rails-6.0.0 [ruby] Upgrade factory_bot_rails to version 6.0.0 commit bb645db Author: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com> Date: Sat Jun 20 03:50:52 2020 +0000 Update factory_bot_rails to version 6.0.0 commit f637e02 Merge: 2dd2929 ee69d49 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue Jun 16 13:50:43 2020 +0200 Merge pull request AlchemyCMS#1879 from tvdeyen/picture-thumbnail-sizes-constant Extract picture thumbnail sizes in a constant commit 2dd2929 Merge: 3072ac9 0ea5aa3 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue Jun 16 12:30:13 2020 +0200 Merge pull request AlchemyCMS#1880 from tvdeyen/fix-picture-library-size-filters Respect filter and tagging params in picture archive size buttons commit ee69d49 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue Jun 16 12:25:05 2020 +0200 Disable Style/TrailingCommaInArguments check This is conflicting with Rufo commit 0ea5aa3 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue Jun 16 12:17:34 2020 +0200 Respect filter and tagging params in picture archive size buttons commit 4264215 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Mon Jun 15 15:25:04 2020 +0200 Extract picture thumbnail sizes in a constant We want to read those value from other classes and it makes sense to have them formalized in a constant anyway. commit 3072ac9 Merge: 1e7c025 a7479da Author: Thomas von Deyen <thomas@vondeyen.com> Date: Mon Jun 15 12:21:28 2020 +0200 Merge pull request AlchemyCMS#1878 from tvdeyen/preprocess-images Configurable Image Preprocessor commit a7479da Author: Thomas von Deyen <thomas@vondeyen.com> Date: Mon Jun 15 10:19:15 2020 +0200 Make image preprocessor configurable You can define your own preprocessor class # config/initializers/alchemy.rb Alchemy::Picture.preprocessor_class = My::ImagePreprocessor commit e251ae5 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Mon Jun 15 09:43:14 2020 +0200 Extract picture preprocessing into service class commit 1e7c025 Merge: 5cbe155 102d9c1 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu Jun 11 16:41:06 2020 +0200 Merge pull request AlchemyCMS#1877 from tvdeyen/preview-per-site Configure edit page preview per site commit 102d9c1 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu Jun 11 14:26:26 2020 +0200 Use pages url path in page preview for external sites If the page preview renders an external site instead of the internal one we pass the url-path instead of the urlname so we make sure that root page urls are ` /` and the language code is prefixed. commit 5795da2 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu Jun 11 14:24:25 2020 +0200 Allow previe url to be configured per site You can now configure the preview url per site. preview: My site name: host: https://www.my-static-site.com auth: username: <%= ENV["BASIC_AUTH_USERNAME"] %> password: <%= ENV["BASIC_AUTH_PASSWORD"] %> commit 5cbe155 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu Jun 11 11:03:51 2020 +0200 v5.0.0.beta1 commit 87f8018 Merge: e3f94b4 751a3df Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu Jun 11 10:23:13 2020 +0200 Merge pull request AlchemyCMS#1780 from alebacca89/fix_remove_picture_in_element fix remove correct image in edit element content picture commit 751a3df Author: Alessandro Baccanelli <alessandro.baccanelli@archimedianet.it> Date: Tue Apr 7 13:35:33 2020 +0200 fix remove correct image in edit element content picture commit e3f94b4 Merge: 69fefff 87b2648 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed Jun 10 12:25:43 2020 +0200 Merge pull request AlchemyCMS#1876 from tvdeyen/page-tree-fix-sorting Fix Page tree sorting after root page removal commit 87b2648 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed Jun 10 11:23:45 2020 +0200 Fix page sorting after root page removal Since we removed the root page we need to adjust the sortable items class. commit 59bc152 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed Jun 10 11:23:22 2020 +0200 Format page sorter with Prettier commit 69fefff Author: Thomas von Deyen <thomas@vondeyen.com> Date: Fri Jun 5 13:50:35 2020 +0200 Update 5.0 changelog commit b3c794e Author: Thomas von Deyen <thomas@vondeyen.com> Date: Fri Jun 5 13:45:47 2020 +0200 Update CHANGELOG for 4.6 release commit 71bf393 Merge: 9a19906 e815878 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Fri Jun 5 13:35:01 2020 +0200 Merge pull request AlchemyCMS#1868 from tvdeyen/remove-attach-to-menu Remove Page#visible commit e815878 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu Jun 4 00:40:20 2020 +0200 Simplify urlname generating There is no need to rebuild every ancestors slug since we already have the parents urlname we can append the slug to. commit cb7de34 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu May 21 08:57:20 2020 +0200 Remove visible from existing pages commit e5eabe1 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu May 21 08:47:48 2020 +0200 Remove usages of visible attribute from Page This is a legacy attribute that was used to show the page in the navigation. Since the render_navigation helper has been removed and the feature has been replaced with a much better feature (Menus) we do not need this attribute anymore. Also this attribute was used to generate the url of a page only taking visible parents into account. This also has been removed. commit 3730ddd Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu Jun 4 00:04:28 2020 +0200 Fix page status in page info dialog commit 44c4a3f Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed Jun 3 00:48:21 2020 +0200 Remove attach_to_menu feature The attach-page-to-menu button in the page form was meant as a transitional feature for introducing menus. Now that they have been established and managing menus has been refined we can remove this rather complex feature. commit 9a19906 Merge: b60c75f daa78e3 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Fri Jun 5 11:41:17 2020 +0200 Merge pull request AlchemyCMS#1874 from tvdeyen/upgrader-fixes 5.0 Upgrader fixes commit daa78e3 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu Jun 4 23:37:40 2020 +0200 Fix the add menu_type migration This migration fails being rolled back because change_column is not reversible. Using `change_column_null` resolves that issue. Also it does not make sense to write into a column we delete any way. commit 9f18b95 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu Jun 4 23:32:12 2020 +0200 Fix the order of upgrade tasks If we run the dedecated 5.0 upgrade tasks before installing the migrations it will skip installing them. Since it is not harmfil to run the migrations before hand and this was the case for the upgrader all the time this fix should be considered fine. commit a67c632 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu Jun 4 23:30:33 2020 +0200 Do not seed while upgrading The Alchemy seeder does not need to run. commit b60c75f Merge: dc242d9 a43c8de Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu Jun 4 09:14:55 2020 +0200 Merge pull request AlchemyCMS#1863 from AlchemyCMS/depfu/update/rubocop-0.85.0 [ruby] Upgrade rubocop to version 0.85.0 commit dc242d9 Merge: c4b6d59 5238788 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu Jun 4 09:12:55 2020 +0200 Merge pull request AlchemyCMS#1872 from tvdeyen/remove-url_nesting-config Remove url_nesting config commit 5238788 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed Jun 3 23:54:32 2020 +0200 Remove url_nesting config commit c4b6d59 Merge: bf9ecd0 c8fcfba Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed Jun 3 21:43:00 2020 +0200 Merge pull request AlchemyCMS#1871 from AlchemyCMS/depfu/update/sassc-2.4.0 [ruby] Upgrade sassc to version 2.4.0 commit c8fcfba Author: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com> Date: Wed Jun 3 14:46:19 2020 +0000 Update sassc to version 2.4.0 commit bf9ecd0 Merge: 5d630bc 51a7d82 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed Jun 3 10:44:06 2020 +0200 Merge pull request AlchemyCMS#1867 from tvdeyen/4.6-backports Cherry picks changes from 4.6-stable that needs to be ported over to master Fix the sitemap wrapper height (AlchemyCMS#1861) Update Urlname translation (AlchemyCMS#1857) Introduce Page#url_path (AlchemyCMS#1859) Show url_path in page tree (AlchemyCMS#1856) Use depth for page tree serializer root_or_leaf (AlchemyCMS#1864) commit 5d630bc Author: Alexander ADAM <alexanderadam@users.noreply.github.com> Date: Wed Jun 3 09:18:24 2020 +0200 fix GitHub Actions spelling (AlchemyCMS#1869) commit 51a7d82 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue May 19 00:16:44 2020 +0200 Reduce horizontal padding of small button commit bb0c50d Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue May 19 00:12:21 2020 +0200 Add active button style commit 86e59cc Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue Jun 2 23:45:26 2020 +0200 Use depth for page tree serializer root_or_leaf (AlchemyCMS#1864) Depth is a cached attribute on the page that does not need calculation and will always be correct even if the root page has been removed. This commit helps to migrate to Alchemy 5 without making further changes to the page tree serializer. Without that change page trees that already have been migrated to "root-page-less" Alchemy 5 will have page toggle switches disappear in the first level. commit 961fdc7 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue Jun 2 22:34:33 2020 +0200 Show url name in Page tree (AlchemyCMS#1856) * Show url_path of page in admin page tree The url_path of a page is useful information. We should always display it not only if the page redirects to external. * Format sitemap.scss with Prettier * Change the sitemap urlname background color The old color was too prominent for that information. * Show a legend on top of admin page trees * Use a left aligned column layout for page tree * Slighty more space for node page name and url * Eager load associated records in page tree serializer Now that we need the language and its site we should eager load them in the page tree serializer. Also the locker of a page should be eager loaded. On a site with ~300 pages loading the page tree went from 722ms to 221ms on my machine. commit c801a36 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue Jun 2 00:49:51 2020 +0200 Introduce page.url_path and use it for alchemyPageSelect (AlchemyCMS#1859) * Introduce page url_path service class Use this class to generate the url_path to a page. It takes several circumstances into account 1. It returns just a slash for language root pages of the default langauge 2. It returns a url path with a leading slash for regular pages 3. It returns a url path with a leading slash and language code prefix for pages not having the default language 4. It returns a url path with a leading slash and the language code for language root pages of a non-default language * Return the page url_path with API responses We want to use the newly introduced url_path attribute on the page selector in the admin. It in general makes sense to have the correct url to a page from the API anyway. * Remove @url_prefix This variable is not used anymore. since we generate the url in page links via the API response. * Use Page#url_path in alchemyPageSelect We do not need to care about adding leading slashes in the template anymore and it fixes a lot of missing features for multi language pages. * Use page.url_path in node.url Instead of having (buggy) page url generating code in the node model, we use the newly introduced page.url_path attribute that takes all necessities into account. * Appease Rubocop * Use page.url_path in page link dialog And with that fix bugs for wrongly generated urls in multi language environments. commit 68c7e02 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu May 28 00:44:06 2020 +0200 Update urlname translation to URL-Path That's what this part of the URL is called according to RFC 1738 commit 40ce6ae Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu May 28 00:43:02 2020 +0200 Use Slug as urlname field label The value entered in this field is the slug. commit e75927f Author: Thomas von Deyen <thomas@vondeyen.com> Date: Sat May 30 00:03:47 2020 +0200 Fix the sitemap wrapper height We want the loading spinner centered. commit 9105536 Merge: 2767a66 21a1028 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed Jun 3 00:01:15 2020 +0200 Merge pull request AlchemyCMS#1844 from tvdeyen/remove-url_nesting Remove url_nesting configuration and always create nested urls commit 2767a66 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue Jun 2 23:30:52 2020 +0200 Use apt update instead of apt-get in GH action (AlchemyCMS#1866) We have some weird connection error on GH actions while installing the database headers. Let's try to use a more modern tool... commit a43c8de Author: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com> Date: Tue Jun 2 17:22:53 2020 +0000 Update rubocop to version 0.85.0 commit 21a1028 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu May 21 10:10:49 2020 +0200 Remove the url_nesting config option And always created nested urls. commit 2f15aba Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu May 21 09:16:57 2020 +0200 Deprecate url_nesting configuration commit de453c5 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed May 27 11:14:10 2020 +0200 Set proper nested set scope on page (AlchemyCMS#1837) * Set proper nested set scope on page * Ensure layoutpages factory never creates a parent With the awesome nested set scope set to language and layoutpage there is no parent with the same scope to move the newly created page to. * Ensure page factory sets language from parent If the page has a parent set we use that as the language. We must avoid to call the parent method in the factory, that's why we use the @cached_attributes here. * Fix page language_root factory for when language is nil We might set language to nil in tests explicitly. * Refactor page specs after factory changes Now that the page factory sets the language to the parent if necessary we can rewrite some specs. commit c7dad35 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed May 27 10:43:59 2020 +0200 Remove active_record_5_1? (AlchemyCMS#1854) This check is not neessary anymore since we dropped support for Rails 5.0 and 5.1 commit 50f19ea Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue May 26 20:26:29 2020 +0200 Use Alchemy npm package instead of hacking webpacker (AlchemyCMS#1853) * Move npm package code into dedicated folder We want to get rid of webpacker * Remove rails/webpacker With that we can dramatically simplify the jest setup * Raise npm package version * Install alchemy npm package into host app Instead of compiling the pack in a hacky way we install the alchemy/admin npm package as dependency of the host apps package.json and copy the admin entry point into the host apps packs folder. This reduces the amount of hacks we need in Alchemy in order to make webpack work. * Remove webpacker hacks Now that we publish a npm package and install alchemy/admin as host app dependency we can remove our webpacker hacks. * Remove and ignore webpacker files from dummy app We want to run the install generator during test setup. * Run Alchemy installer during test setup That way we ensure that everything is setup correctly and the generator is actually tested in a sort. * Cache node_modules of dummy app on CI This gem has two node_modules folder now, on in the dummy app and one for the jest specs. commit 913d3dd Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue May 26 15:20:22 2020 +0200 Fix node select ES5 syntax (AlchemyCMS#1851) * Do not use object destructering in node select This is not supported in ES5 * Format node select with Prettier commit 14625b7 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Tue May 26 10:29:34 2020 +0200 Remove male sign after emoji (AlchemyCMS#1849) The wizard can be gender neutral. commit 5397826 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Tue May 26 10:29:17 2020 +0200 Run yarn:install after installing webpacker in install generator (AlchemyCMS#1850) Without doing this, the app will not find Alchemy's webpack packs. commit 84ac809 Author: Mikael Norlén <mickenorlen@gmail.com> Date: Mon May 25 23:22:54 2020 +0200 Add indifferent access to default options in encoded_image (AlchemyCMS#1840) commit fe36e20 Author: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com> Date: Mon May 25 23:19:48 2020 +0200 Update rubocop to version 0.84.0 (AlchemyCMS#1845) Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com> commit f7ffece Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Mon May 25 13:21:59 2020 +0200 Do not use ES6 Syntax in Node Selector (AlchemyCMS#1846) The previous version of this code fails in host apps that do not have Uglifier in Harmony mode. Let's stick with ES5 instead. commit 73963dd Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Tue May 19 09:12:11 2020 +0200 Translated root menus (AlchemyCMS#1825) * Add menu_type column to nodes This column holds information about what type this menu is - a footer or a main menu, for example. * Make menu_type available in the admin This adds the following functionality: - Choose a menu type when creating a new root node - Change the menu name for a root node if that's necessary or desired via `edit` - Restrict the options for menu type depending on which nodes on a language are already present * Render child nodes directly in nodes partial The "options" local is often not given, and the `node_partial_name` key is never set any longer, as it is always `node.to_partial_path`.` * Render footer in Dummy App This can be used to test Alchemy::EssenceNodes from the Dummy app. commit 6a08040 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Mon May 18 20:55:37 2020 +0200 Fix deleting an EssenceNode from a content (AlchemyCMS#1834) We can leverage Rails' functionality here. commit 3e4d476 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Mon May 18 20:54:58 2020 +0200 Use Rails standards for deleting pages from EssencePage (AlchemyCMS#1833) Rails offers ways for setting relations, let's use them. commit 2cb3228 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Mon May 18 20:53:27 2020 +0200 Install Webpacker in install generator (AlchemyCMS#1835) We use this generator in the Alchemy ecosystem, and the dummy apps of gems like alchemy-devise or alchemy-solidus need webpacker installed to function. commit 02983a0 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Thu May 14 14:52:15 2020 +0200 Scope has one site (AlchemyCMS#1832) * Make alchemy_pages.layoutpage null: false We want to have an actual Boolean and no nil values. * Scope Language Root Page to Non-Layoutpages Layoutpages can not be root pages. commit 8ff8ca2 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Thu May 14 14:23:52 2020 +0200 Add error flash to resource controller (AlchemyCMS#1827) This adds an error flash to the resource controller if some action does not succeed. commit f25b8e5 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Thu May 14 10:37:23 2020 +0200 Render nodes (AlchemyCMS#1831) * Allow directly rendering nodes We can use Rails' model rendering mechanism to render nodes by changing `to_partial_path` to not point to the wrapper, but to the node itself. This yields a few simplifications. * Adapt generator partials to not use node_partial_path This is now `node.to_partial_path`. * Actually render node when rendering an EssenceNode commit f58f4f9 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Wed May 13 23:43:33 2020 +0200 Add errors when node cant be deleted (AlchemyCMS#1828) * Add error before destroying node with attached essence Nodes that are used on e.g. content pages can not be simply destroyed. This commit adds an error message so the user knows what's going on. * Do not destroy nodes with dependent nodes that are in use on a page This moves the validation up in the file so that awesome_nested_set does not run its `delete_all` callback before we validate that it can do that. It also extends the validation such that we collect all the pages that are referenced in the subtree below this node. commit 729cd21 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Wed May 13 16:53:11 2020 +0200 Fix Association between Nodes and EssenceNodes (AlchemyCMS#1826) There was a typo here resulting in Nodes being associated to themselves in an impossible way. commit 0eec65a Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Mon May 11 09:36:14 2020 +0200 Add a quick Node select (AlchemyCMS#1821) * Add a quick Node select This faster select also shows the ancestors of each node, such that one is not confused between nodes that have similar names. * Fix Copy-Paste error that tries assigning Pages to EssenceNodes Prior to this commit, saving an EssenceNode by ID would never work... * Serialize Node with Ancestors for initial selection * Center initial selection in Alchemy::EssenceNode select Maybe we should look at using Flexbox for this so we can center things more easily. * Add specs for NodesController Index Action It's always good to have specs. commit 30c2aa8 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Fri May 8 23:13:51 2020 +0200 Add has_one association for root page (AlchemyCMS#1820) This should allow us to preload better, and I believe Rails will also cache the association if necessary. commit 81ae05f Author: Thomas von Deyen <thomas@vondeyen.com> Date: Fri May 8 22:53:12 2020 +0200 Use rails root in install generator (AlchemyCMS#1822) * Move generators out of rails folder * Use Rails app root to join paths Without that it is not always ensured that the path is the hosts apps root path. * Refactor elements generator naming validation commit 5a86ae5 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed May 6 23:30:07 2020 +0200 Make page.language mandatory (AlchemyCMS#1818) Now that we removed all hidden "systempages" we can ensure that a language is always present on a page. commit 6fccc3b Author: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com> Date: Wed May 6 17:54:46 2020 +0200 Update babel-jest to version 26.0.1 (AlchemyCMS#1819) Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com> commit 4b43ce8 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed May 6 14:38:15 2020 +0200 Remove root page (AlchemyCMS#1817) * Remove Page#systempage? * Remove Page.root We do not need a single root page. All pages that share the same language are a nested set. * Format page_scopes.rb * Format pages controller spec file * Add upgrader task to remove root page * Rubocop -a commit dc7b25d Merge: 19aa55f 2196e80 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Wed May 6 13:13:52 2020 +0200 Merge pull request AlchemyCMS#1807 from mamhoff/remove-site-id-from-nodes Remove Site ID from nodes commit 19aa55f Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed May 6 13:02:56 2020 +0200 Remove Page.ancestors_for (AlchemyCMS#1813) Its only used by the render_breadcrumb helper and that could just use the self_and_ancestors scope. commit 2196e80 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Wed May 6 10:22:17 2020 +0200 Add Down Migration commit 8b7cd55 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed May 6 00:57:37 2020 +0200 Fix page unlock page icon replacement (AlchemyCMS#1816) Without this strong selector it happens that more icons get appended than necessary. Also rewritten in VanillaJS commit c7261e8 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed May 6 00:57:17 2020 +0200 Invoke rake task in upgrader instead of system call (AlchemyCMS#1815) commit 6d9e5d8 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed May 6 00:56:57 2020 +0200 Remove old 4.4 upgrader class (AlchemyCMS#1814) commit 12c97fe Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue May 5 20:53:40 2020 +0200 Remove layout root pages (AlchemyCMS#1812) * Remove layout root page We do not need this hidden page. All pages that share the same language and have `layoutpage` set to true are the layoutpages for the current language. * Pass the language in new page form We want to be sure that the language we instantiate the page with gets passed with the form * Only set the language from parent if present And use the current page, not the default (that is the current anyway if no current language has been explicitely set). * Add upgrader for removing layout root pages commit 9a67a36 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue May 5 17:52:22 2020 +0200 Use timestamps method in migration files (AlchemyCMS#1811) Instead of an database dependent datetime column, we should use the Rails database agnostic timestamps method for creating the columns. commit afd266d Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue May 5 17:49:51 2020 +0200 Remove legacy element serializer (AlchemyCMS#1810) This serializer has been introduced 4 years ago with the release of Alchemy 3.1. This can be safely removed now. commit 34b1721 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue May 5 17:12:08 2020 +0200 Remove timestamps from essences and contents (AlchemyCMS#1809) * Remove timestamps from essence and contents tables These records always ever get created within an element. So, this information is duplicated. * Format attachment and picture model classes with Rufo * Touch element after essence has been saved The content will rarely be cached inside of an already cached element. * Format attachment and picture spec files * Touch elements after attachment or picture has been saved Do not touch contents any more. We removed the timestamps as they only get created in the context of an element and the element gets cached, not the single content. * Rubocop -a commit c206a2a Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue May 5 12:24:50 2020 +0200 Remove stamper from content model (AlchemyCMS#1808) The content model always ever is created within an element and it does not make sense to have this information twice. commit 09abf7b Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Tue May 5 12:21:43 2020 +0200 Add Alchemy::Language.has_many :nodes (AlchemyCMS#1806) We need those association declarations for better preloading. commit ba1acf5 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue May 5 09:18:54 2020 +0200 Drop Rails 5.0 and 5.1 support (AlchemyCMS#1805) * Drop Rails 5.0 and 5.1 support These Rails versions are not officially supported anymore and we want to be able to better support MySQL with bigint foreign keys. * Use references in migrations for foreign keys That way the database adapter will chose the correct column type for foreign keys. Adds better support for MySQL. Closes AlchemyCMS#1796 commit a6f3640 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue May 5 08:53:04 2020 +0200 Remove acts_as_list from Content (AlchemyCMS#1798) Closes AlchemyCMS#1793 commit 4b60c7b Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Mon May 4 23:10:24 2020 +0200 Remove Site ID from nodes Nodes can get their Site through their language. commit 9301a06 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Mon May 4 23:31:27 2020 +0200 Remove enforce_ssl (AlchemyCMS#1804) Removes the enforce_ssl configuration and the SSLProtection module. Please use the Rails build in config.force_ssl or your Webserver for that. commit 09f3041 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Mon May 4 23:30:39 2020 +0200 Remove stamper from essences (AlchemyCMS#1802) We do not need the creator and updater information on the essences. We already have them on the elements. commit 7596a48 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu Apr 30 11:36:11 2020 +0200 Make the preview url configurable (AlchemyCMS#1803) * Make the preview url configurable By default Alchemy uses its internal page preview renderer, but you can configure it now to be any URL instead. Basic Auth is supported as well. Example config/alchemy/config.yml preview: host: https://www.my-static-site.com auth: username: <%= ENV["BASIC_AUTH_USERNAME"] %> password: <%= ENV["BASIC_AUTH_PASSWORD"] %> This is great for static sites. * Satisfy the Hound commit 1e95b31 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed Apr 29 21:54:56 2020 +0200 Use Rufo to format all files in a consistent way (AlchemyCMS#1799) * Rubocop -a * Fix rubocop config * [Rufo] Add trailing commas * [Rufo] Use double quotes for strings * Add Rufo as local dev dependency commit 7a79235 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Tue Apr 28 12:52:14 2020 +0200 Add EssenceNode (AlchemyCMS#1792) This Essence can be used to add a menu and its children to an Element. commit 489181e Merge: 5093856 28876c6 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Mon Apr 27 08:34:43 2020 +0200 Merge branch 'fix-email' commit 5093856 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Mon Apr 27 08:28:08 2020 +0200 Convert NodeTree into ES6 (AlchemyCMS#1782) * Install sortablejs npm package * Revert "Add favicon to assets manifest" The favicon is already linked with the images folder. * Convert NodeTree and utils into ES6 modules And make the `on` delegated event handler work with multiple base nodes * Fix base node folding * Extract ajax and events into own utils modules commit addc211 Author: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com> Date: Wed Apr 22 11:25:37 2020 +0200 Update rubocop to version 0.82.0 (AlchemyCMS#1785) Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com> commit 37d7737 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed Apr 22 10:40:49 2020 +0200 Use 2.5.7 of code climate coverage reporter GH action (AlchemyCMS#1790) * Use 2.5.7 of code climate coverage reporter GH action * Raise mysql service health check retries This service takes for ever to start commit 4433ede Author: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com> Date: Wed Apr 22 09:51:36 2020 +0200 Update sassc to version 2.3.0 (AlchemyCMS#1787) Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com> commit 5d8ae3b Author: Thomas von Deyen <thomas@vondeyen.com> Date: Fri Apr 17 08:51:14 2020 +0200 Fix regular icons (AlchemyCMS#1784) * Fix Font Awesome regular icons It's `asset_url` not `assets_url`. * Update icons to Font Awesome 5.13.0 Aka. the Corona release commit e246432 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue Apr 7 21:38:24 2020 +0200 Add Webpacker (AlchemyCMS#1775) * Install webpacker and configure own instance Following the official webpacker engines guide * Add demo admin JS pack Something to work with during testing * Serve and compile Alchemy packs in host app Serve the Alchemy packs via Rack::Static if public file server is enabled (ie. during development) and enhance the yarn:install and assets:precompile tasks so that the Alchemy packs get compiled asd well. Copy over the files into host apps public/ folder afterwards. * Ensure that we run yarn install before installing Alchemy * Ensure to also serve packs in tests * Install node modules on GH CI * Do not use our own webpacker instance in page preview We want the webpacker instance of the host app in the preview frame. * Use webpacker 5 * Add a prettier config * Add a webpack-dev-server proxy * Only enhance rake tasks that are present If you install webpacker into a fresh Rails app there is not yarn:install task yet. * Update Babel config and add core-js * Add and configure Jest * Run Jest specs in GH CI * Convert i18n module into ES6 * Add favicon to assets Sprockets complains that we need this file * Enable Jest coverage reports for code climate * Ignore unknown window messages Now that we have Webpack installed the dev server emits messages on the window as well. Lets just ignore them. commit 28876c6 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Sun Feb 23 15:12:55 2020 +0100 Fix email in gemspec
commit 8432864 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu Jun 25 13:40:41 2020 +0200 Bump version to 5.0.0.beta2 commit afd7319 Merge: 5bdf08a 9565b37 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue Jun 23 14:06:21 2020 +0200 Merge pull request AlchemyCMS#1884 from mamhoff/allow-page-factory-with-host-app-locale Language Factory: Create default language in host app's locale commit 9565b37 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Tue Jun 23 11:53:00 2020 +0200 Reload before checking for related EssenceNodes The most recent version of AwesomeNestedSet stops reloading `self` when saving. This leads to `self` having inaccurate values for `lft` and `rgt` in our spec, making `node.self_and_descendants` sometimes not find all children. Luckily our specs found this. commit 36ee497 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Tue Jun 23 10:46:07 2020 +0200 Create default language in host app's locale Our default language factory will create a page in German. That's not great for apps that do not have German as an `available_locale`, as Alchemy now validates the language_code of the language. This change adds a new trait "german" to satisfy our existing test suite, but creates by default a language in the host apps first available locale. commit 5bdf08a Merge: f637e02 bb645db Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue Jun 23 12:59:38 2020 +0200 Merge pull request AlchemyCMS#1883 from AlchemyCMS/depfu/update/factory_bot_rails-6.0.0 [ruby] Upgrade factory_bot_rails to version 6.0.0 commit bb645db Author: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com> Date: Sat Jun 20 03:50:52 2020 +0000 Update factory_bot_rails to version 6.0.0 commit f637e02 Merge: 2dd2929 ee69d49 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue Jun 16 13:50:43 2020 +0200 Merge pull request AlchemyCMS#1879 from tvdeyen/picture-thumbnail-sizes-constant Extract picture thumbnail sizes in a constant commit 2dd2929 Merge: 3072ac9 0ea5aa3 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue Jun 16 12:30:13 2020 +0200 Merge pull request AlchemyCMS#1880 from tvdeyen/fix-picture-library-size-filters Respect filter and tagging params in picture archive size buttons commit ee69d49 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue Jun 16 12:25:05 2020 +0200 Disable Style/TrailingCommaInArguments check This is conflicting with Rufo commit 0ea5aa3 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue Jun 16 12:17:34 2020 +0200 Respect filter and tagging params in picture archive size buttons commit 4264215 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Mon Jun 15 15:25:04 2020 +0200 Extract picture thumbnail sizes in a constant We want to read those value from other classes and it makes sense to have them formalized in a constant anyway. commit 3072ac9 Merge: 1e7c025 a7479da Author: Thomas von Deyen <thomas@vondeyen.com> Date: Mon Jun 15 12:21:28 2020 +0200 Merge pull request AlchemyCMS#1878 from tvdeyen/preprocess-images Configurable Image Preprocessor commit a7479da Author: Thomas von Deyen <thomas@vondeyen.com> Date: Mon Jun 15 10:19:15 2020 +0200 Make image preprocessor configurable You can define your own preprocessor class # config/initializers/alchemy.rb Alchemy::Picture.preprocessor_class = My::ImagePreprocessor commit e251ae5 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Mon Jun 15 09:43:14 2020 +0200 Extract picture preprocessing into service class commit 1e7c025 Merge: 5cbe155 102d9c1 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu Jun 11 16:41:06 2020 +0200 Merge pull request AlchemyCMS#1877 from tvdeyen/preview-per-site Configure edit page preview per site commit 102d9c1 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu Jun 11 14:26:26 2020 +0200 Use pages url path in page preview for external sites If the page preview renders an external site instead of the internal one we pass the url-path instead of the urlname so we make sure that root page urls are ` /` and the language code is prefixed. commit 5795da2 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu Jun 11 14:24:25 2020 +0200 Allow previe url to be configured per site You can now configure the preview url per site. preview: My site name: host: https://www.my-static-site.com auth: username: <%= ENV["BASIC_AUTH_USERNAME"] %> password: <%= ENV["BASIC_AUTH_PASSWORD"] %> commit 5cbe155 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu Jun 11 11:03:51 2020 +0200 v5.0.0.beta1 commit 87f8018 Merge: e3f94b4 751a3df Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu Jun 11 10:23:13 2020 +0200 Merge pull request AlchemyCMS#1780 from alebacca89/fix_remove_picture_in_element fix remove correct image in edit element content picture commit 751a3df Author: Alessandro Baccanelli <alessandro.baccanelli@archimedianet.it> Date: Tue Apr 7 13:35:33 2020 +0200 fix remove correct image in edit element content picture commit e3f94b4 Merge: 69fefff 87b2648 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed Jun 10 12:25:43 2020 +0200 Merge pull request AlchemyCMS#1876 from tvdeyen/page-tree-fix-sorting Fix Page tree sorting after root page removal commit 87b2648 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed Jun 10 11:23:45 2020 +0200 Fix page sorting after root page removal Since we removed the root page we need to adjust the sortable items class. commit 59bc152 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed Jun 10 11:23:22 2020 +0200 Format page sorter with Prettier commit 69fefff Author: Thomas von Deyen <thomas@vondeyen.com> Date: Fri Jun 5 13:50:35 2020 +0200 Update 5.0 changelog commit b3c794e Author: Thomas von Deyen <thomas@vondeyen.com> Date: Fri Jun 5 13:45:47 2020 +0200 Update CHANGELOG for 4.6 release commit 71bf393 Merge: 9a19906 e815878 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Fri Jun 5 13:35:01 2020 +0200 Merge pull request AlchemyCMS#1868 from tvdeyen/remove-attach-to-menu Remove Page#visible commit e815878 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu Jun 4 00:40:20 2020 +0200 Simplify urlname generating There is no need to rebuild every ancestors slug since we already have the parents urlname we can append the slug to. commit cb7de34 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu May 21 08:57:20 2020 +0200 Remove visible from existing pages commit e5eabe1 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu May 21 08:47:48 2020 +0200 Remove usages of visible attribute from Page This is a legacy attribute that was used to show the page in the navigation. Since the render_navigation helper has been removed and the feature has been replaced with a much better feature (Menus) we do not need this attribute anymore. Also this attribute was used to generate the url of a page only taking visible parents into account. This also has been removed. commit 3730ddd Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu Jun 4 00:04:28 2020 +0200 Fix page status in page info dialog commit 44c4a3f Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed Jun 3 00:48:21 2020 +0200 Remove attach_to_menu feature The attach-page-to-menu button in the page form was meant as a transitional feature for introducing menus. Now that they have been established and managing menus has been refined we can remove this rather complex feature. commit 9a19906 Merge: b60c75f daa78e3 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Fri Jun 5 11:41:17 2020 +0200 Merge pull request AlchemyCMS#1874 from tvdeyen/upgrader-fixes 5.0 Upgrader fixes commit daa78e3 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu Jun 4 23:37:40 2020 +0200 Fix the add menu_type migration This migration fails being rolled back because change_column is not reversible. Using `change_column_null` resolves that issue. Also it does not make sense to write into a column we delete any way. commit 9f18b95 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu Jun 4 23:32:12 2020 +0200 Fix the order of upgrade tasks If we run the dedecated 5.0 upgrade tasks before installing the migrations it will skip installing them. Since it is not harmfil to run the migrations before hand and this was the case for the upgrader all the time this fix should be considered fine. commit a67c632 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu Jun 4 23:30:33 2020 +0200 Do not seed while upgrading The Alchemy seeder does not need to run. commit b60c75f Merge: dc242d9 a43c8de Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu Jun 4 09:14:55 2020 +0200 Merge pull request AlchemyCMS#1863 from AlchemyCMS/depfu/update/rubocop-0.85.0 [ruby] Upgrade rubocop to version 0.85.0 commit dc242d9 Merge: c4b6d59 5238788 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu Jun 4 09:12:55 2020 +0200 Merge pull request AlchemyCMS#1872 from tvdeyen/remove-url_nesting-config Remove url_nesting config commit 5238788 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed Jun 3 23:54:32 2020 +0200 Remove url_nesting config commit c4b6d59 Merge: bf9ecd0 c8fcfba Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed Jun 3 21:43:00 2020 +0200 Merge pull request AlchemyCMS#1871 from AlchemyCMS/depfu/update/sassc-2.4.0 [ruby] Upgrade sassc to version 2.4.0 commit c8fcfba Author: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com> Date: Wed Jun 3 14:46:19 2020 +0000 Update sassc to version 2.4.0 commit bf9ecd0 Merge: 5d630bc 51a7d82 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed Jun 3 10:44:06 2020 +0200 Merge pull request AlchemyCMS#1867 from tvdeyen/4.6-backports Cherry picks changes from 4.6-stable that needs to be ported over to master Fix the sitemap wrapper height (AlchemyCMS#1861) Update Urlname translation (AlchemyCMS#1857) Introduce Page#url_path (AlchemyCMS#1859) Show url_path in page tree (AlchemyCMS#1856) Use depth for page tree serializer root_or_leaf (AlchemyCMS#1864) commit 5d630bc Author: Alexander ADAM <alexanderadam@users.noreply.github.com> Date: Wed Jun 3 09:18:24 2020 +0200 fix GitHub Actions spelling (AlchemyCMS#1869) commit 51a7d82 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue May 19 00:16:44 2020 +0200 Reduce horizontal padding of small button commit bb0c50d Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue May 19 00:12:21 2020 +0200 Add active button style commit 86e59cc Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue Jun 2 23:45:26 2020 +0200 Use depth for page tree serializer root_or_leaf (AlchemyCMS#1864) Depth is a cached attribute on the page that does not need calculation and will always be correct even if the root page has been removed. This commit helps to migrate to Alchemy 5 without making further changes to the page tree serializer. Without that change page trees that already have been migrated to "root-page-less" Alchemy 5 will have page toggle switches disappear in the first level. commit 961fdc7 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue Jun 2 22:34:33 2020 +0200 Show url name in Page tree (AlchemyCMS#1856) * Show url_path of page in admin page tree The url_path of a page is useful information. We should always display it not only if the page redirects to external. * Format sitemap.scss with Prettier * Change the sitemap urlname background color The old color was too prominent for that information. * Show a legend on top of admin page trees * Use a left aligned column layout for page tree * Slighty more space for node page name and url * Eager load associated records in page tree serializer Now that we need the language and its site we should eager load them in the page tree serializer. Also the locker of a page should be eager loaded. On a site with ~300 pages loading the page tree went from 722ms to 221ms on my machine. commit c801a36 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue Jun 2 00:49:51 2020 +0200 Introduce page.url_path and use it for alchemyPageSelect (AlchemyCMS#1859) * Introduce page url_path service class Use this class to generate the url_path to a page. It takes several circumstances into account 1. It returns just a slash for language root pages of the default langauge 2. It returns a url path with a leading slash for regular pages 3. It returns a url path with a leading slash and language code prefix for pages not having the default language 4. It returns a url path with a leading slash and the language code for language root pages of a non-default language * Return the page url_path with API responses We want to use the newly introduced url_path attribute on the page selector in the admin. It in general makes sense to have the correct url to a page from the API anyway. * Remove @url_prefix This variable is not used anymore. since we generate the url in page links via the API response. * Use Page#url_path in alchemyPageSelect We do not need to care about adding leading slashes in the template anymore and it fixes a lot of missing features for multi language pages. * Use page.url_path in node.url Instead of having (buggy) page url generating code in the node model, we use the newly introduced page.url_path attribute that takes all necessities into account. * Appease Rubocop * Use page.url_path in page link dialog And with that fix bugs for wrongly generated urls in multi language environments. commit 68c7e02 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu May 28 00:44:06 2020 +0200 Update urlname translation to URL-Path That's what this part of the URL is called according to RFC 1738 commit 40ce6ae Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu May 28 00:43:02 2020 +0200 Use Slug as urlname field label The value entered in this field is the slug. commit e75927f Author: Thomas von Deyen <thomas@vondeyen.com> Date: Sat May 30 00:03:47 2020 +0200 Fix the sitemap wrapper height We want the loading spinner centered. commit 9105536 Merge: 2767a66 21a1028 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed Jun 3 00:01:15 2020 +0200 Merge pull request AlchemyCMS#1844 from tvdeyen/remove-url_nesting Remove url_nesting configuration and always create nested urls commit 2767a66 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue Jun 2 23:30:52 2020 +0200 Use apt update instead of apt-get in GH action (AlchemyCMS#1866) We have some weird connection error on GH actions while installing the database headers. Let's try to use a more modern tool... commit a43c8de Author: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com> Date: Tue Jun 2 17:22:53 2020 +0000 Update rubocop to version 0.85.0 commit 21a1028 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu May 21 10:10:49 2020 +0200 Remove the url_nesting config option And always created nested urls. commit 2f15aba Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu May 21 09:16:57 2020 +0200 Deprecate url_nesting configuration commit de453c5 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed May 27 11:14:10 2020 +0200 Set proper nested set scope on page (AlchemyCMS#1837) * Set proper nested set scope on page * Ensure layoutpages factory never creates a parent With the awesome nested set scope set to language and layoutpage there is no parent with the same scope to move the newly created page to. * Ensure page factory sets language from parent If the page has a parent set we use that as the language. We must avoid to call the parent method in the factory, that's why we use the @cached_attributes here. * Fix page language_root factory for when language is nil We might set language to nil in tests explicitly. * Refactor page specs after factory changes Now that the page factory sets the language to the parent if necessary we can rewrite some specs. commit c7dad35 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed May 27 10:43:59 2020 +0200 Remove active_record_5_1? (AlchemyCMS#1854) This check is not neessary anymore since we dropped support for Rails 5.0 and 5.1 commit 50f19ea Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue May 26 20:26:29 2020 +0200 Use Alchemy npm package instead of hacking webpacker (AlchemyCMS#1853) * Move npm package code into dedicated folder We want to get rid of webpacker * Remove rails/webpacker With that we can dramatically simplify the jest setup * Raise npm package version * Install alchemy npm package into host app Instead of compiling the pack in a hacky way we install the alchemy/admin npm package as dependency of the host apps package.json and copy the admin entry point into the host apps packs folder. This reduces the amount of hacks we need in Alchemy in order to make webpack work. * Remove webpacker hacks Now that we publish a npm package and install alchemy/admin as host app dependency we can remove our webpacker hacks. * Remove and ignore webpacker files from dummy app We want to run the install generator during test setup. * Run Alchemy installer during test setup That way we ensure that everything is setup correctly and the generator is actually tested in a sort. * Cache node_modules of dummy app on CI This gem has two node_modules folder now, on in the dummy app and one for the jest specs. commit 913d3dd Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue May 26 15:20:22 2020 +0200 Fix node select ES5 syntax (AlchemyCMS#1851) * Do not use object destructering in node select This is not supported in ES5 * Format node select with Prettier commit 14625b7 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Tue May 26 10:29:34 2020 +0200 Remove male sign after emoji (AlchemyCMS#1849) The wizard can be gender neutral. commit 5397826 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Tue May 26 10:29:17 2020 +0200 Run yarn:install after installing webpacker in install generator (AlchemyCMS#1850) Without doing this, the app will not find Alchemy's webpack packs. commit 84ac809 Author: Mikael Norlén <mickenorlen@gmail.com> Date: Mon May 25 23:22:54 2020 +0200 Add indifferent access to default options in encoded_image (AlchemyCMS#1840) commit fe36e20 Author: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com> Date: Mon May 25 23:19:48 2020 +0200 Update rubocop to version 0.84.0 (AlchemyCMS#1845) Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com> commit f7ffece Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Mon May 25 13:21:59 2020 +0200 Do not use ES6 Syntax in Node Selector (AlchemyCMS#1846) The previous version of this code fails in host apps that do not have Uglifier in Harmony mode. Let's stick with ES5 instead. commit 73963dd Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Tue May 19 09:12:11 2020 +0200 Translated root menus (AlchemyCMS#1825) * Add menu_type column to nodes This column holds information about what type this menu is - a footer or a main menu, for example. * Make menu_type available in the admin This adds the following functionality: - Choose a menu type when creating a new root node - Change the menu name for a root node if that's necessary or desired via `edit` - Restrict the options for menu type depending on which nodes on a language are already present * Render child nodes directly in nodes partial The "options" local is often not given, and the `node_partial_name` key is never set any longer, as it is always `node.to_partial_path`.` * Render footer in Dummy App This can be used to test Alchemy::EssenceNodes from the Dummy app. commit 6a08040 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Mon May 18 20:55:37 2020 +0200 Fix deleting an EssenceNode from a content (AlchemyCMS#1834) We can leverage Rails' functionality here. commit 3e4d476 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Mon May 18 20:54:58 2020 +0200 Use Rails standards for deleting pages from EssencePage (AlchemyCMS#1833) Rails offers ways for setting relations, let's use them. commit 2cb3228 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Mon May 18 20:53:27 2020 +0200 Install Webpacker in install generator (AlchemyCMS#1835) We use this generator in the Alchemy ecosystem, and the dummy apps of gems like alchemy-devise or alchemy-solidus need webpacker installed to function. commit 02983a0 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Thu May 14 14:52:15 2020 +0200 Scope has one site (AlchemyCMS#1832) * Make alchemy_pages.layoutpage null: false We want to have an actual Boolean and no nil values. * Scope Language Root Page to Non-Layoutpages Layoutpages can not be root pages. commit 8ff8ca2 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Thu May 14 14:23:52 2020 +0200 Add error flash to resource controller (AlchemyCMS#1827) This adds an error flash to the resource controller if some action does not succeed. commit f25b8e5 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Thu May 14 10:37:23 2020 +0200 Render nodes (AlchemyCMS#1831) * Allow directly rendering nodes We can use Rails' model rendering mechanism to render nodes by changing `to_partial_path` to not point to the wrapper, but to the node itself. This yields a few simplifications. * Adapt generator partials to not use node_partial_path This is now `node.to_partial_path`. * Actually render node when rendering an EssenceNode commit f58f4f9 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Wed May 13 23:43:33 2020 +0200 Add errors when node cant be deleted (AlchemyCMS#1828) * Add error before destroying node with attached essence Nodes that are used on e.g. content pages can not be simply destroyed. This commit adds an error message so the user knows what's going on. * Do not destroy nodes with dependent nodes that are in use on a page This moves the validation up in the file so that awesome_nested_set does not run its `delete_all` callback before we validate that it can do that. It also extends the validation such that we collect all the pages that are referenced in the subtree below this node. commit 729cd21 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Wed May 13 16:53:11 2020 +0200 Fix Association between Nodes and EssenceNodes (AlchemyCMS#1826) There was a typo here resulting in Nodes being associated to themselves in an impossible way. commit 0eec65a Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Mon May 11 09:36:14 2020 +0200 Add a quick Node select (AlchemyCMS#1821) * Add a quick Node select This faster select also shows the ancestors of each node, such that one is not confused between nodes that have similar names. * Fix Copy-Paste error that tries assigning Pages to EssenceNodes Prior to this commit, saving an EssenceNode by ID would never work... * Serialize Node with Ancestors for initial selection * Center initial selection in Alchemy::EssenceNode select Maybe we should look at using Flexbox for this so we can center things more easily. * Add specs for NodesController Index Action It's always good to have specs. commit 30c2aa8 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Fri May 8 23:13:51 2020 +0200 Add has_one association for root page (AlchemyCMS#1820) This should allow us to preload better, and I believe Rails will also cache the association if necessary. commit 81ae05f Author: Thomas von Deyen <thomas@vondeyen.com> Date: Fri May 8 22:53:12 2020 +0200 Use rails root in install generator (AlchemyCMS#1822) * Move generators out of rails folder * Use Rails app root to join paths Without that it is not always ensured that the path is the hosts apps root path. * Refactor elements generator naming validation commit 5a86ae5 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed May 6 23:30:07 2020 +0200 Make page.language mandatory (AlchemyCMS#1818) Now that we removed all hidden "systempages" we can ensure that a language is always present on a page. commit 6fccc3b Author: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com> Date: Wed May 6 17:54:46 2020 +0200 Update babel-jest to version 26.0.1 (AlchemyCMS#1819) Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com> commit 4b43ce8 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed May 6 14:38:15 2020 +0200 Remove root page (AlchemyCMS#1817) * Remove Page#systempage? * Remove Page.root We do not need a single root page. All pages that share the same language are a nested set. * Format page_scopes.rb * Format pages controller spec file * Add upgrader task to remove root page * Rubocop -a commit dc7b25d Merge: 19aa55f 2196e80 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Wed May 6 13:13:52 2020 +0200 Merge pull request AlchemyCMS#1807 from mamhoff/remove-site-id-from-nodes Remove Site ID from nodes commit 19aa55f Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed May 6 13:02:56 2020 +0200 Remove Page.ancestors_for (AlchemyCMS#1813) Its only used by the render_breadcrumb helper and that could just use the self_and_ancestors scope. commit 2196e80 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Wed May 6 10:22:17 2020 +0200 Add Down Migration commit 8b7cd55 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed May 6 00:57:37 2020 +0200 Fix page unlock page icon replacement (AlchemyCMS#1816) Without this strong selector it happens that more icons get appended than necessary. Also rewritten in VanillaJS commit c7261e8 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed May 6 00:57:17 2020 +0200 Invoke rake task in upgrader instead of system call (AlchemyCMS#1815) commit 6d9e5d8 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed May 6 00:56:57 2020 +0200 Remove old 4.4 upgrader class (AlchemyCMS#1814) commit 12c97fe Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue May 5 20:53:40 2020 +0200 Remove layout root pages (AlchemyCMS#1812) * Remove layout root page We do not need this hidden page. All pages that share the same language and have `layoutpage` set to true are the layoutpages for the current language. * Pass the language in new page form We want to be sure that the language we instantiate the page with gets passed with the form * Only set the language from parent if present And use the current page, not the default (that is the current anyway if no current language has been explicitely set). * Add upgrader for removing layout root pages commit 9a67a36 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue May 5 17:52:22 2020 +0200 Use timestamps method in migration files (AlchemyCMS#1811) Instead of an database dependent datetime column, we should use the Rails database agnostic timestamps method for creating the columns. commit afd266d Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue May 5 17:49:51 2020 +0200 Remove legacy element serializer (AlchemyCMS#1810) This serializer has been introduced 4 years ago with the release of Alchemy 3.1. This can be safely removed now. commit 34b1721 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue May 5 17:12:08 2020 +0200 Remove timestamps from essences and contents (AlchemyCMS#1809) * Remove timestamps from essence and contents tables These records always ever get created within an element. So, this information is duplicated. * Format attachment and picture model classes with Rufo * Touch element after essence has been saved The content will rarely be cached inside of an already cached element. * Format attachment and picture spec files * Touch elements after attachment or picture has been saved Do not touch contents any more. We removed the timestamps as they only get created in the context of an element and the element gets cached, not the single content. * Rubocop -a commit c206a2a Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue May 5 12:24:50 2020 +0200 Remove stamper from content model (AlchemyCMS#1808) The content model always ever is created within an element and it does not make sense to have this information twice. commit 09abf7b Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Tue May 5 12:21:43 2020 +0200 Add Alchemy::Language.has_many :nodes (AlchemyCMS#1806) We need those association declarations for better preloading. commit ba1acf5 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue May 5 09:18:54 2020 +0200 Drop Rails 5.0 and 5.1 support (AlchemyCMS#1805) * Drop Rails 5.0 and 5.1 support These Rails versions are not officially supported anymore and we want to be able to better support MySQL with bigint foreign keys. * Use references in migrations for foreign keys That way the database adapter will chose the correct column type for foreign keys. Adds better support for MySQL. Closes AlchemyCMS#1796 commit a6f3640 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue May 5 08:53:04 2020 +0200 Remove acts_as_list from Content (AlchemyCMS#1798) Closes AlchemyCMS#1793 commit 4b60c7b Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Mon May 4 23:10:24 2020 +0200 Remove Site ID from nodes Nodes can get their Site through their language. commit 9301a06 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Mon May 4 23:31:27 2020 +0200 Remove enforce_ssl (AlchemyCMS#1804) Removes the enforce_ssl configuration and the SSLProtection module. Please use the Rails build in config.force_ssl or your Webserver for that. commit 09f3041 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Mon May 4 23:30:39 2020 +0200 Remove stamper from essences (AlchemyCMS#1802) We do not need the creator and updater information on the essences. We already have them on the elements. commit 7596a48 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu Apr 30 11:36:11 2020 +0200 Make the preview url configurable (AlchemyCMS#1803) * Make the preview url configurable By default Alchemy uses its internal page preview renderer, but you can configure it now to be any URL instead. Basic Auth is supported as well. Example config/alchemy/config.yml preview: host: https://www.my-static-site.com auth: username: <%= ENV["BASIC_AUTH_USERNAME"] %> password: <%= ENV["BASIC_AUTH_PASSWORD"] %> This is great for static sites. * Satisfy the Hound commit 1e95b31 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed Apr 29 21:54:56 2020 +0200 Use Rufo to format all files in a consistent way (AlchemyCMS#1799) * Rubocop -a * Fix rubocop config * [Rufo] Add trailing commas * [Rufo] Use double quotes for strings * Add Rufo as local dev dependency commit 7a79235 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Tue Apr 28 12:52:14 2020 +0200 Add EssenceNode (AlchemyCMS#1792) This Essence can be used to add a menu and its children to an Element. commit 489181e Merge: 5093856 28876c6 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Mon Apr 27 08:34:43 2020 +0200 Merge branch 'fix-email' commit 5093856 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Mon Apr 27 08:28:08 2020 +0200 Convert NodeTree into ES6 (AlchemyCMS#1782) * Install sortablejs npm package * Revert "Add favicon to assets manifest" The favicon is already linked with the images folder. * Convert NodeTree and utils into ES6 modules And make the `on` delegated event handler work with multiple base nodes * Fix base node folding * Extract ajax and events into own utils modules commit addc211 Author: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com> Date: Wed Apr 22 11:25:37 2020 +0200 Update rubocop to version 0.82.0 (AlchemyCMS#1785) Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com> commit 37d7737 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed Apr 22 10:40:49 2020 +0200 Use 2.5.7 of code climate coverage reporter GH action (AlchemyCMS#1790) * Use 2.5.7 of code climate coverage reporter GH action * Raise mysql service health check retries This service takes for ever to start commit 4433ede Author: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com> Date: Wed Apr 22 09:51:36 2020 +0200 Update sassc to version 2.3.0 (AlchemyCMS#1787) Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com> commit 5d8ae3b Author: Thomas von Deyen <thomas@vondeyen.com> Date: Fri Apr 17 08:51:14 2020 +0200 Fix regular icons (AlchemyCMS#1784) * Fix Font Awesome regular icons It's `asset_url` not `assets_url`. * Update icons to Font Awesome 5.13.0 Aka. the Corona release commit e246432 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue Apr 7 21:38:24 2020 +0200 Add Webpacker (AlchemyCMS#1775) * Install webpacker and configure own instance Following the official webpacker engines guide * Add demo admin JS pack Something to work with during testing * Serve and compile Alchemy packs in host app Serve the Alchemy packs via Rack::Static if public file server is enabled (ie. during development) and enhance the yarn:install and assets:precompile tasks so that the Alchemy packs get compiled asd well. Copy over the files into host apps public/ folder afterwards. * Ensure that we run yarn install before installing Alchemy * Ensure to also serve packs in tests * Install node modules on GH CI * Do not use our own webpacker instance in page preview We want the webpacker instance of the host app in the preview frame. * Use webpacker 5 * Add a prettier config * Add a webpack-dev-server proxy * Only enhance rake tasks that are present If you install webpacker into a fresh Rails app there is not yarn:install task yet. * Update Babel config and add core-js * Add and configure Jest * Run Jest specs in GH CI * Convert i18n module into ES6 * Add favicon to assets Sprockets complains that we need this file * Enable Jest coverage reports for code climate * Ignore unknown window messages Now that we have Webpack installed the dev server emits messages on the window as well. Lets just ignore them. commit 28876c6 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Sun Feb 23 15:12:55 2020 +0100 Fix email in gemspec
commit 8432864 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu Jun 25 13:40:41 2020 +0200 Bump version to 5.0.0.beta2 commit afd7319 Merge: 5bdf08a 9565b37 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue Jun 23 14:06:21 2020 +0200 Merge pull request AlchemyCMS#1884 from mamhoff/allow-page-factory-with-host-app-locale Language Factory: Create default language in host app's locale commit 9565b37 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Tue Jun 23 11:53:00 2020 +0200 Reload before checking for related EssenceNodes The most recent version of AwesomeNestedSet stops reloading `self` when saving. This leads to `self` having inaccurate values for `lft` and `rgt` in our spec, making `node.self_and_descendants` sometimes not find all children. Luckily our specs found this. commit 36ee497 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Tue Jun 23 10:46:07 2020 +0200 Create default language in host app's locale Our default language factory will create a page in German. That's not great for apps that do not have German as an `available_locale`, as Alchemy now validates the language_code of the language. This change adds a new trait "german" to satisfy our existing test suite, but creates by default a language in the host apps first available locale. commit 5bdf08a Merge: f637e02 bb645db Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue Jun 23 12:59:38 2020 +0200 Merge pull request AlchemyCMS#1883 from AlchemyCMS/depfu/update/factory_bot_rails-6.0.0 [ruby] Upgrade factory_bot_rails to version 6.0.0 commit bb645db Author: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com> Date: Sat Jun 20 03:50:52 2020 +0000 Update factory_bot_rails to version 6.0.0 commit f637e02 Merge: 2dd2929 ee69d49 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue Jun 16 13:50:43 2020 +0200 Merge pull request AlchemyCMS#1879 from tvdeyen/picture-thumbnail-sizes-constant Extract picture thumbnail sizes in a constant commit 2dd2929 Merge: 3072ac9 0ea5aa3 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue Jun 16 12:30:13 2020 +0200 Merge pull request AlchemyCMS#1880 from tvdeyen/fix-picture-library-size-filters Respect filter and tagging params in picture archive size buttons commit ee69d49 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue Jun 16 12:25:05 2020 +0200 Disable Style/TrailingCommaInArguments check This is conflicting with Rufo commit 0ea5aa3 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue Jun 16 12:17:34 2020 +0200 Respect filter and tagging params in picture archive size buttons commit 4264215 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Mon Jun 15 15:25:04 2020 +0200 Extract picture thumbnail sizes in a constant We want to read those value from other classes and it makes sense to have them formalized in a constant anyway. commit 3072ac9 Merge: 1e7c025 a7479da Author: Thomas von Deyen <thomas@vondeyen.com> Date: Mon Jun 15 12:21:28 2020 +0200 Merge pull request AlchemyCMS#1878 from tvdeyen/preprocess-images Configurable Image Preprocessor commit a7479da Author: Thomas von Deyen <thomas@vondeyen.com> Date: Mon Jun 15 10:19:15 2020 +0200 Make image preprocessor configurable You can define your own preprocessor class # config/initializers/alchemy.rb Alchemy::Picture.preprocessor_class = My::ImagePreprocessor commit e251ae5 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Mon Jun 15 09:43:14 2020 +0200 Extract picture preprocessing into service class commit 1e7c025 Merge: 5cbe155 102d9c1 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu Jun 11 16:41:06 2020 +0200 Merge pull request AlchemyCMS#1877 from tvdeyen/preview-per-site Configure edit page preview per site commit 102d9c1 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu Jun 11 14:26:26 2020 +0200 Use pages url path in page preview for external sites If the page preview renders an external site instead of the internal one we pass the url-path instead of the urlname so we make sure that root page urls are ` /` and the language code is prefixed. commit 5795da2 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu Jun 11 14:24:25 2020 +0200 Allow previe url to be configured per site You can now configure the preview url per site. preview: My site name: host: https://www.my-static-site.com auth: username: <%= ENV["BASIC_AUTH_USERNAME"] %> password: <%= ENV["BASIC_AUTH_PASSWORD"] %> commit 5cbe155 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu Jun 11 11:03:51 2020 +0200 v5.0.0.beta1 commit 87f8018 Merge: e3f94b4 751a3df Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu Jun 11 10:23:13 2020 +0200 Merge pull request AlchemyCMS#1780 from alebacca89/fix_remove_picture_in_element fix remove correct image in edit element content picture commit 751a3df Author: Alessandro Baccanelli <alessandro.baccanelli@archimedianet.it> Date: Tue Apr 7 13:35:33 2020 +0200 fix remove correct image in edit element content picture commit e3f94b4 Merge: 69fefff 87b2648 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed Jun 10 12:25:43 2020 +0200 Merge pull request AlchemyCMS#1876 from tvdeyen/page-tree-fix-sorting Fix Page tree sorting after root page removal commit 87b2648 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed Jun 10 11:23:45 2020 +0200 Fix page sorting after root page removal Since we removed the root page we need to adjust the sortable items class. commit 59bc152 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed Jun 10 11:23:22 2020 +0200 Format page sorter with Prettier commit 69fefff Author: Thomas von Deyen <thomas@vondeyen.com> Date: Fri Jun 5 13:50:35 2020 +0200 Update 5.0 changelog commit b3c794e Author: Thomas von Deyen <thomas@vondeyen.com> Date: Fri Jun 5 13:45:47 2020 +0200 Update CHANGELOG for 4.6 release commit 71bf393 Merge: 9a19906 e815878 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Fri Jun 5 13:35:01 2020 +0200 Merge pull request AlchemyCMS#1868 from tvdeyen/remove-attach-to-menu Remove Page#visible commit e815878 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu Jun 4 00:40:20 2020 +0200 Simplify urlname generating There is no need to rebuild every ancestors slug since we already have the parents urlname we can append the slug to. commit cb7de34 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu May 21 08:57:20 2020 +0200 Remove visible from existing pages commit e5eabe1 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu May 21 08:47:48 2020 +0200 Remove usages of visible attribute from Page This is a legacy attribute that was used to show the page in the navigation. Since the render_navigation helper has been removed and the feature has been replaced with a much better feature (Menus) we do not need this attribute anymore. Also this attribute was used to generate the url of a page only taking visible parents into account. This also has been removed. commit 3730ddd Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu Jun 4 00:04:28 2020 +0200 Fix page status in page info dialog commit 44c4a3f Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed Jun 3 00:48:21 2020 +0200 Remove attach_to_menu feature The attach-page-to-menu button in the page form was meant as a transitional feature for introducing menus. Now that they have been established and managing menus has been refined we can remove this rather complex feature. commit 9a19906 Merge: b60c75f daa78e3 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Fri Jun 5 11:41:17 2020 +0200 Merge pull request AlchemyCMS#1874 from tvdeyen/upgrader-fixes 5.0 Upgrader fixes commit daa78e3 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu Jun 4 23:37:40 2020 +0200 Fix the add menu_type migration This migration fails being rolled back because change_column is not reversible. Using `change_column_null` resolves that issue. Also it does not make sense to write into a column we delete any way. commit 9f18b95 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu Jun 4 23:32:12 2020 +0200 Fix the order of upgrade tasks If we run the dedecated 5.0 upgrade tasks before installing the migrations it will skip installing them. Since it is not harmfil to run the migrations before hand and this was the case for the upgrader all the time this fix should be considered fine. commit a67c632 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu Jun 4 23:30:33 2020 +0200 Do not seed while upgrading The Alchemy seeder does not need to run. commit b60c75f Merge: dc242d9 a43c8de Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu Jun 4 09:14:55 2020 +0200 Merge pull request AlchemyCMS#1863 from AlchemyCMS/depfu/update/rubocop-0.85.0 [ruby] Upgrade rubocop to version 0.85.0 commit dc242d9 Merge: c4b6d59 5238788 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu Jun 4 09:12:55 2020 +0200 Merge pull request AlchemyCMS#1872 from tvdeyen/remove-url_nesting-config Remove url_nesting config commit 5238788 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed Jun 3 23:54:32 2020 +0200 Remove url_nesting config commit c4b6d59 Merge: bf9ecd0 c8fcfba Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed Jun 3 21:43:00 2020 +0200 Merge pull request AlchemyCMS#1871 from AlchemyCMS/depfu/update/sassc-2.4.0 [ruby] Upgrade sassc to version 2.4.0 commit c8fcfba Author: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com> Date: Wed Jun 3 14:46:19 2020 +0000 Update sassc to version 2.4.0 commit bf9ecd0 Merge: 5d630bc 51a7d82 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed Jun 3 10:44:06 2020 +0200 Merge pull request AlchemyCMS#1867 from tvdeyen/4.6-backports Cherry picks changes from 4.6-stable that needs to be ported over to master Fix the sitemap wrapper height (AlchemyCMS#1861) Update Urlname translation (AlchemyCMS#1857) Introduce Page#url_path (AlchemyCMS#1859) Show url_path in page tree (AlchemyCMS#1856) Use depth for page tree serializer root_or_leaf (AlchemyCMS#1864) commit 5d630bc Author: Alexander ADAM <alexanderadam@users.noreply.github.com> Date: Wed Jun 3 09:18:24 2020 +0200 fix GitHub Actions spelling (AlchemyCMS#1869) commit 51a7d82 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue May 19 00:16:44 2020 +0200 Reduce horizontal padding of small button commit bb0c50d Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue May 19 00:12:21 2020 +0200 Add active button style commit 86e59cc Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue Jun 2 23:45:26 2020 +0200 Use depth for page tree serializer root_or_leaf (AlchemyCMS#1864) Depth is a cached attribute on the page that does not need calculation and will always be correct even if the root page has been removed. This commit helps to migrate to Alchemy 5 without making further changes to the page tree serializer. Without that change page trees that already have been migrated to "root-page-less" Alchemy 5 will have page toggle switches disappear in the first level. commit 961fdc7 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue Jun 2 22:34:33 2020 +0200 Show url name in Page tree (AlchemyCMS#1856) * Show url_path of page in admin page tree The url_path of a page is useful information. We should always display it not only if the page redirects to external. * Format sitemap.scss with Prettier * Change the sitemap urlname background color The old color was too prominent for that information. * Show a legend on top of admin page trees * Use a left aligned column layout for page tree * Slighty more space for node page name and url * Eager load associated records in page tree serializer Now that we need the language and its site we should eager load them in the page tree serializer. Also the locker of a page should be eager loaded. On a site with ~300 pages loading the page tree went from 722ms to 221ms on my machine. commit c801a36 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue Jun 2 00:49:51 2020 +0200 Introduce page.url_path and use it for alchemyPageSelect (AlchemyCMS#1859) * Introduce page url_path service class Use this class to generate the url_path to a page. It takes several circumstances into account 1. It returns just a slash for language root pages of the default langauge 2. It returns a url path with a leading slash for regular pages 3. It returns a url path with a leading slash and language code prefix for pages not having the default language 4. It returns a url path with a leading slash and the language code for language root pages of a non-default language * Return the page url_path with API responses We want to use the newly introduced url_path attribute on the page selector in the admin. It in general makes sense to have the correct url to a page from the API anyway. * Remove @url_prefix This variable is not used anymore. since we generate the url in page links via the API response. * Use Page#url_path in alchemyPageSelect We do not need to care about adding leading slashes in the template anymore and it fixes a lot of missing features for multi language pages. * Use page.url_path in node.url Instead of having (buggy) page url generating code in the node model, we use the newly introduced page.url_path attribute that takes all necessities into account. * Appease Rubocop * Use page.url_path in page link dialog And with that fix bugs for wrongly generated urls in multi language environments. commit 68c7e02 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu May 28 00:44:06 2020 +0200 Update urlname translation to URL-Path That's what this part of the URL is called according to RFC 1738 commit 40ce6ae Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu May 28 00:43:02 2020 +0200 Use Slug as urlname field label The value entered in this field is the slug. commit e75927f Author: Thomas von Deyen <thomas@vondeyen.com> Date: Sat May 30 00:03:47 2020 +0200 Fix the sitemap wrapper height We want the loading spinner centered. commit 9105536 Merge: 2767a66 21a1028 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed Jun 3 00:01:15 2020 +0200 Merge pull request AlchemyCMS#1844 from tvdeyen/remove-url_nesting Remove url_nesting configuration and always create nested urls commit 2767a66 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue Jun 2 23:30:52 2020 +0200 Use apt update instead of apt-get in GH action (AlchemyCMS#1866) We have some weird connection error on GH actions while installing the database headers. Let's try to use a more modern tool... commit a43c8de Author: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com> Date: Tue Jun 2 17:22:53 2020 +0000 Update rubocop to version 0.85.0 commit 21a1028 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu May 21 10:10:49 2020 +0200 Remove the url_nesting config option And always created nested urls. commit 2f15aba Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu May 21 09:16:57 2020 +0200 Deprecate url_nesting configuration commit de453c5 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed May 27 11:14:10 2020 +0200 Set proper nested set scope on page (AlchemyCMS#1837) * Set proper nested set scope on page * Ensure layoutpages factory never creates a parent With the awesome nested set scope set to language and layoutpage there is no parent with the same scope to move the newly created page to. * Ensure page factory sets language from parent If the page has a parent set we use that as the language. We must avoid to call the parent method in the factory, that's why we use the @cached_attributes here. * Fix page language_root factory for when language is nil We might set language to nil in tests explicitly. * Refactor page specs after factory changes Now that the page factory sets the language to the parent if necessary we can rewrite some specs. commit c7dad35 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed May 27 10:43:59 2020 +0200 Remove active_record_5_1? (AlchemyCMS#1854) This check is not neessary anymore since we dropped support for Rails 5.0 and 5.1 commit 50f19ea Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue May 26 20:26:29 2020 +0200 Use Alchemy npm package instead of hacking webpacker (AlchemyCMS#1853) * Move npm package code into dedicated folder We want to get rid of webpacker * Remove rails/webpacker With that we can dramatically simplify the jest setup * Raise npm package version * Install alchemy npm package into host app Instead of compiling the pack in a hacky way we install the alchemy/admin npm package as dependency of the host apps package.json and copy the admin entry point into the host apps packs folder. This reduces the amount of hacks we need in Alchemy in order to make webpack work. * Remove webpacker hacks Now that we publish a npm package and install alchemy/admin as host app dependency we can remove our webpacker hacks. * Remove and ignore webpacker files from dummy app We want to run the install generator during test setup. * Run Alchemy installer during test setup That way we ensure that everything is setup correctly and the generator is actually tested in a sort. * Cache node_modules of dummy app on CI This gem has two node_modules folder now, on in the dummy app and one for the jest specs. commit 913d3dd Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue May 26 15:20:22 2020 +0200 Fix node select ES5 syntax (AlchemyCMS#1851) * Do not use object destructering in node select This is not supported in ES5 * Format node select with Prettier commit 14625b7 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Tue May 26 10:29:34 2020 +0200 Remove male sign after emoji (AlchemyCMS#1849) The wizard can be gender neutral. commit 5397826 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Tue May 26 10:29:17 2020 +0200 Run yarn:install after installing webpacker in install generator (AlchemyCMS#1850) Without doing this, the app will not find Alchemy's webpack packs. commit 84ac809 Author: Mikael Norlén <mickenorlen@gmail.com> Date: Mon May 25 23:22:54 2020 +0200 Add indifferent access to default options in encoded_image (AlchemyCMS#1840) commit fe36e20 Author: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com> Date: Mon May 25 23:19:48 2020 +0200 Update rubocop to version 0.84.0 (AlchemyCMS#1845) Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com> commit f7ffece Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Mon May 25 13:21:59 2020 +0200 Do not use ES6 Syntax in Node Selector (AlchemyCMS#1846) The previous version of this code fails in host apps that do not have Uglifier in Harmony mode. Let's stick with ES5 instead. commit 73963dd Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Tue May 19 09:12:11 2020 +0200 Translated root menus (AlchemyCMS#1825) * Add menu_type column to nodes This column holds information about what type this menu is - a footer or a main menu, for example. * Make menu_type available in the admin This adds the following functionality: - Choose a menu type when creating a new root node - Change the menu name for a root node if that's necessary or desired via `edit` - Restrict the options for menu type depending on which nodes on a language are already present * Render child nodes directly in nodes partial The "options" local is often not given, and the `node_partial_name` key is never set any longer, as it is always `node.to_partial_path`.` * Render footer in Dummy App This can be used to test Alchemy::EssenceNodes from the Dummy app. commit 6a08040 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Mon May 18 20:55:37 2020 +0200 Fix deleting an EssenceNode from a content (AlchemyCMS#1834) We can leverage Rails' functionality here. commit 3e4d476 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Mon May 18 20:54:58 2020 +0200 Use Rails standards for deleting pages from EssencePage (AlchemyCMS#1833) Rails offers ways for setting relations, let's use them. commit 2cb3228 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Mon May 18 20:53:27 2020 +0200 Install Webpacker in install generator (AlchemyCMS#1835) We use this generator in the Alchemy ecosystem, and the dummy apps of gems like alchemy-devise or alchemy-solidus need webpacker installed to function. commit 02983a0 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Thu May 14 14:52:15 2020 +0200 Scope has one site (AlchemyCMS#1832) * Make alchemy_pages.layoutpage null: false We want to have an actual Boolean and no nil values. * Scope Language Root Page to Non-Layoutpages Layoutpages can not be root pages. commit 8ff8ca2 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Thu May 14 14:23:52 2020 +0200 Add error flash to resource controller (AlchemyCMS#1827) This adds an error flash to the resource controller if some action does not succeed. commit f25b8e5 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Thu May 14 10:37:23 2020 +0200 Render nodes (AlchemyCMS#1831) * Allow directly rendering nodes We can use Rails' model rendering mechanism to render nodes by changing `to_partial_path` to not point to the wrapper, but to the node itself. This yields a few simplifications. * Adapt generator partials to not use node_partial_path This is now `node.to_partial_path`. * Actually render node when rendering an EssenceNode commit f58f4f9 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Wed May 13 23:43:33 2020 +0200 Add errors when node cant be deleted (AlchemyCMS#1828) * Add error before destroying node with attached essence Nodes that are used on e.g. content pages can not be simply destroyed. This commit adds an error message so the user knows what's going on. * Do not destroy nodes with dependent nodes that are in use on a page This moves the validation up in the file so that awesome_nested_set does not run its `delete_all` callback before we validate that it can do that. It also extends the validation such that we collect all the pages that are referenced in the subtree below this node. commit 729cd21 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Wed May 13 16:53:11 2020 +0200 Fix Association between Nodes and EssenceNodes (AlchemyCMS#1826) There was a typo here resulting in Nodes being associated to themselves in an impossible way. commit 0eec65a Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Mon May 11 09:36:14 2020 +0200 Add a quick Node select (AlchemyCMS#1821) * Add a quick Node select This faster select also shows the ancestors of each node, such that one is not confused between nodes that have similar names. * Fix Copy-Paste error that tries assigning Pages to EssenceNodes Prior to this commit, saving an EssenceNode by ID would never work... * Serialize Node with Ancestors for initial selection * Center initial selection in Alchemy::EssenceNode select Maybe we should look at using Flexbox for this so we can center things more easily. * Add specs for NodesController Index Action It's always good to have specs. commit 30c2aa8 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Fri May 8 23:13:51 2020 +0200 Add has_one association for root page (AlchemyCMS#1820) This should allow us to preload better, and I believe Rails will also cache the association if necessary. commit 81ae05f Author: Thomas von Deyen <thomas@vondeyen.com> Date: Fri May 8 22:53:12 2020 +0200 Use rails root in install generator (AlchemyCMS#1822) * Move generators out of rails folder * Use Rails app root to join paths Without that it is not always ensured that the path is the hosts apps root path. * Refactor elements generator naming validation commit 5a86ae5 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed May 6 23:30:07 2020 +0200 Make page.language mandatory (AlchemyCMS#1818) Now that we removed all hidden "systempages" we can ensure that a language is always present on a page. commit 6fccc3b Author: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com> Date: Wed May 6 17:54:46 2020 +0200 Update babel-jest to version 26.0.1 (AlchemyCMS#1819) Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com> commit 4b43ce8 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed May 6 14:38:15 2020 +0200 Remove root page (AlchemyCMS#1817) * Remove Page#systempage? * Remove Page.root We do not need a single root page. All pages that share the same language are a nested set. * Format page_scopes.rb * Format pages controller spec file * Add upgrader task to remove root page * Rubocop -a commit dc7b25d Merge: 19aa55f 2196e80 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Wed May 6 13:13:52 2020 +0200 Merge pull request AlchemyCMS#1807 from mamhoff/remove-site-id-from-nodes Remove Site ID from nodes commit 19aa55f Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed May 6 13:02:56 2020 +0200 Remove Page.ancestors_for (AlchemyCMS#1813) Its only used by the render_breadcrumb helper and that could just use the self_and_ancestors scope. commit 2196e80 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Wed May 6 10:22:17 2020 +0200 Add Down Migration commit 8b7cd55 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed May 6 00:57:37 2020 +0200 Fix page unlock page icon replacement (AlchemyCMS#1816) Without this strong selector it happens that more icons get appended than necessary. Also rewritten in VanillaJS commit c7261e8 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed May 6 00:57:17 2020 +0200 Invoke rake task in upgrader instead of system call (AlchemyCMS#1815) commit 6d9e5d8 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed May 6 00:56:57 2020 +0200 Remove old 4.4 upgrader class (AlchemyCMS#1814) commit 12c97fe Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue May 5 20:53:40 2020 +0200 Remove layout root pages (AlchemyCMS#1812) * Remove layout root page We do not need this hidden page. All pages that share the same language and have `layoutpage` set to true are the layoutpages for the current language. * Pass the language in new page form We want to be sure that the language we instantiate the page with gets passed with the form * Only set the language from parent if present And use the current page, not the default (that is the current anyway if no current language has been explicitely set). * Add upgrader for removing layout root pages commit 9a67a36 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue May 5 17:52:22 2020 +0200 Use timestamps method in migration files (AlchemyCMS#1811) Instead of an database dependent datetime column, we should use the Rails database agnostic timestamps method for creating the columns. commit afd266d Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue May 5 17:49:51 2020 +0200 Remove legacy element serializer (AlchemyCMS#1810) This serializer has been introduced 4 years ago with the release of Alchemy 3.1. This can be safely removed now. commit 34b1721 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue May 5 17:12:08 2020 +0200 Remove timestamps from essences and contents (AlchemyCMS#1809) * Remove timestamps from essence and contents tables These records always ever get created within an element. So, this information is duplicated. * Format attachment and picture model classes with Rufo * Touch element after essence has been saved The content will rarely be cached inside of an already cached element. * Format attachment and picture spec files * Touch elements after attachment or picture has been saved Do not touch contents any more. We removed the timestamps as they only get created in the context of an element and the element gets cached, not the single content. * Rubocop -a commit c206a2a Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue May 5 12:24:50 2020 +0200 Remove stamper from content model (AlchemyCMS#1808) The content model always ever is created within an element and it does not make sense to have this information twice. commit 09abf7b Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Tue May 5 12:21:43 2020 +0200 Add Alchemy::Language.has_many :nodes (AlchemyCMS#1806) We need those association declarations for better preloading. commit ba1acf5 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue May 5 09:18:54 2020 +0200 Drop Rails 5.0 and 5.1 support (AlchemyCMS#1805) * Drop Rails 5.0 and 5.1 support These Rails versions are not officially supported anymore and we want to be able to better support MySQL with bigint foreign keys. * Use references in migrations for foreign keys That way the database adapter will chose the correct column type for foreign keys. Adds better support for MySQL. Closes AlchemyCMS#1796 commit a6f3640 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue May 5 08:53:04 2020 +0200 Remove acts_as_list from Content (AlchemyCMS#1798) Closes AlchemyCMS#1793 commit 4b60c7b Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Mon May 4 23:10:24 2020 +0200 Remove Site ID from nodes Nodes can get their Site through their language. commit 9301a06 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Mon May 4 23:31:27 2020 +0200 Remove enforce_ssl (AlchemyCMS#1804) Removes the enforce_ssl configuration and the SSLProtection module. Please use the Rails build in config.force_ssl or your Webserver for that. commit 09f3041 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Mon May 4 23:30:39 2020 +0200 Remove stamper from essences (AlchemyCMS#1802) We do not need the creator and updater information on the essences. We already have them on the elements. commit 7596a48 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu Apr 30 11:36:11 2020 +0200 Make the preview url configurable (AlchemyCMS#1803) * Make the preview url configurable By default Alchemy uses its internal page preview renderer, but you can configure it now to be any URL instead. Basic Auth is supported as well. Example config/alchemy/config.yml preview: host: https://www.my-static-site.com auth: username: <%= ENV["BASIC_AUTH_USERNAME"] %> password: <%= ENV["BASIC_AUTH_PASSWORD"] %> This is great for static sites. * Satisfy the Hound commit 1e95b31 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed Apr 29 21:54:56 2020 +0200 Use Rufo to format all files in a consistent way (AlchemyCMS#1799) * Rubocop -a * Fix rubocop config * [Rufo] Add trailing commas * [Rufo] Use double quotes for strings * Add Rufo as local dev dependency commit 7a79235 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Tue Apr 28 12:52:14 2020 +0200 Add EssenceNode (AlchemyCMS#1792) This Essence can be used to add a menu and its children to an Element. commit 489181e Merge: 5093856 28876c6 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Mon Apr 27 08:34:43 2020 +0200 Merge branch 'fix-email' commit 5093856 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Mon Apr 27 08:28:08 2020 +0200 Convert NodeTree into ES6 (AlchemyCMS#1782) * Install sortablejs npm package * Revert "Add favicon to assets manifest" The favicon is already linked with the images folder. * Convert NodeTree and utils into ES6 modules And make the `on` delegated event handler work with multiple base nodes * Fix base node folding * Extract ajax and events into own utils modules commit addc211 Author: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com> Date: Wed Apr 22 11:25:37 2020 +0200 Update rubocop to version 0.82.0 (AlchemyCMS#1785) Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com> commit 37d7737 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed Apr 22 10:40:49 2020 +0200 Use 2.5.7 of code climate coverage reporter GH action (AlchemyCMS#1790) * Use 2.5.7 of code climate coverage reporter GH action * Raise mysql service health check retries This service takes for ever to start commit 4433ede Author: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com> Date: Wed Apr 22 09:51:36 2020 +0200 Update sassc to version 2.3.0 (AlchemyCMS#1787) Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com> commit 5d8ae3b Author: Thomas von Deyen <thomas@vondeyen.com> Date: Fri Apr 17 08:51:14 2020 +0200 Fix regular icons (AlchemyCMS#1784) * Fix Font Awesome regular icons It's `asset_url` not `assets_url`. * Update icons to Font Awesome 5.13.0 Aka. the Corona release commit e246432 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue Apr 7 21:38:24 2020 +0200 Add Webpacker (AlchemyCMS#1775) * Install webpacker and configure own instance Following the official webpacker engines guide * Add demo admin JS pack Something to work with during testing * Serve and compile Alchemy packs in host app Serve the Alchemy packs via Rack::Static if public file server is enabled (ie. during development) and enhance the yarn:install and assets:precompile tasks so that the Alchemy packs get compiled asd well. Copy over the files into host apps public/ folder afterwards. * Ensure that we run yarn install before installing Alchemy * Ensure to also serve packs in tests * Install node modules on GH CI * Do not use our own webpacker instance in page preview We want the webpacker instance of the host app in the preview frame. * Use webpacker 5 * Add a prettier config * Add a webpack-dev-server proxy * Only enhance rake tasks that are present If you install webpacker into a fresh Rails app there is not yarn:install task yet. * Update Babel config and add core-js * Add and configure Jest * Run Jest specs in GH CI * Convert i18n module into ES6 * Add favicon to assets Sprockets complains that we need this file * Enable Jest coverage reports for code climate * Ignore unknown window messages Now that we have Webpack installed the dev server emits messages on the window as well. Lets just ignore them. commit 28876c6 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Sun Feb 23 15:12:55 2020 +0100 Fix email in gemspec
commit 8432864 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu Jun 25 13:40:41 2020 +0200 Bump version to 5.0.0.beta2 commit afd7319 Merge: 5bdf08a 9565b37 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue Jun 23 14:06:21 2020 +0200 Merge pull request AlchemyCMS#1884 from mamhoff/allow-page-factory-with-host-app-locale Language Factory: Create default language in host app's locale commit 9565b37 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Tue Jun 23 11:53:00 2020 +0200 Reload before checking for related EssenceNodes The most recent version of AwesomeNestedSet stops reloading `self` when saving. This leads to `self` having inaccurate values for `lft` and `rgt` in our spec, making `node.self_and_descendants` sometimes not find all children. Luckily our specs found this. commit 36ee497 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Tue Jun 23 10:46:07 2020 +0200 Create default language in host app's locale Our default language factory will create a page in German. That's not great for apps that do not have German as an `available_locale`, as Alchemy now validates the language_code of the language. This change adds a new trait "german" to satisfy our existing test suite, but creates by default a language in the host apps first available locale. commit 5bdf08a Merge: f637e02 bb645db Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue Jun 23 12:59:38 2020 +0200 Merge pull request AlchemyCMS#1883 from AlchemyCMS/depfu/update/factory_bot_rails-6.0.0 [ruby] Upgrade factory_bot_rails to version 6.0.0 commit bb645db Author: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com> Date: Sat Jun 20 03:50:52 2020 +0000 Update factory_bot_rails to version 6.0.0 commit f637e02 Merge: 2dd2929 ee69d49 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue Jun 16 13:50:43 2020 +0200 Merge pull request AlchemyCMS#1879 from tvdeyen/picture-thumbnail-sizes-constant Extract picture thumbnail sizes in a constant commit 2dd2929 Merge: 3072ac9 0ea5aa3 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue Jun 16 12:30:13 2020 +0200 Merge pull request AlchemyCMS#1880 from tvdeyen/fix-picture-library-size-filters Respect filter and tagging params in picture archive size buttons commit ee69d49 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue Jun 16 12:25:05 2020 +0200 Disable Style/TrailingCommaInArguments check This is conflicting with Rufo commit 0ea5aa3 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue Jun 16 12:17:34 2020 +0200 Respect filter and tagging params in picture archive size buttons commit 4264215 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Mon Jun 15 15:25:04 2020 +0200 Extract picture thumbnail sizes in a constant We want to read those value from other classes and it makes sense to have them formalized in a constant anyway. commit 3072ac9 Merge: 1e7c025 a7479da Author: Thomas von Deyen <thomas@vondeyen.com> Date: Mon Jun 15 12:21:28 2020 +0200 Merge pull request AlchemyCMS#1878 from tvdeyen/preprocess-images Configurable Image Preprocessor commit a7479da Author: Thomas von Deyen <thomas@vondeyen.com> Date: Mon Jun 15 10:19:15 2020 +0200 Make image preprocessor configurable You can define your own preprocessor class # config/initializers/alchemy.rb Alchemy::Picture.preprocessor_class = My::ImagePreprocessor commit e251ae5 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Mon Jun 15 09:43:14 2020 +0200 Extract picture preprocessing into service class commit 1e7c025 Merge: 5cbe155 102d9c1 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu Jun 11 16:41:06 2020 +0200 Merge pull request AlchemyCMS#1877 from tvdeyen/preview-per-site Configure edit page preview per site commit 102d9c1 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu Jun 11 14:26:26 2020 +0200 Use pages url path in page preview for external sites If the page preview renders an external site instead of the internal one we pass the url-path instead of the urlname so we make sure that root page urls are ` /` and the language code is prefixed. commit 5795da2 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu Jun 11 14:24:25 2020 +0200 Allow previe url to be configured per site You can now configure the preview url per site. preview: My site name: host: https://www.my-static-site.com auth: username: <%= ENV["BASIC_AUTH_USERNAME"] %> password: <%= ENV["BASIC_AUTH_PASSWORD"] %> commit 5cbe155 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu Jun 11 11:03:51 2020 +0200 v5.0.0.beta1 commit 87f8018 Merge: e3f94b4 751a3df Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu Jun 11 10:23:13 2020 +0200 Merge pull request AlchemyCMS#1780 from alebacca89/fix_remove_picture_in_element fix remove correct image in edit element content picture commit 751a3df Author: Alessandro Baccanelli <alessandro.baccanelli@archimedianet.it> Date: Tue Apr 7 13:35:33 2020 +0200 fix remove correct image in edit element content picture commit e3f94b4 Merge: 69fefff 87b2648 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed Jun 10 12:25:43 2020 +0200 Merge pull request AlchemyCMS#1876 from tvdeyen/page-tree-fix-sorting Fix Page tree sorting after root page removal commit 87b2648 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed Jun 10 11:23:45 2020 +0200 Fix page sorting after root page removal Since we removed the root page we need to adjust the sortable items class. commit 59bc152 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed Jun 10 11:23:22 2020 +0200 Format page sorter with Prettier commit 69fefff Author: Thomas von Deyen <thomas@vondeyen.com> Date: Fri Jun 5 13:50:35 2020 +0200 Update 5.0 changelog commit b3c794e Author: Thomas von Deyen <thomas@vondeyen.com> Date: Fri Jun 5 13:45:47 2020 +0200 Update CHANGELOG for 4.6 release commit 71bf393 Merge: 9a19906 e815878 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Fri Jun 5 13:35:01 2020 +0200 Merge pull request AlchemyCMS#1868 from tvdeyen/remove-attach-to-menu Remove Page#visible commit e815878 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu Jun 4 00:40:20 2020 +0200 Simplify urlname generating There is no need to rebuild every ancestors slug since we already have the parents urlname we can append the slug to. commit cb7de34 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu May 21 08:57:20 2020 +0200 Remove visible from existing pages commit e5eabe1 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu May 21 08:47:48 2020 +0200 Remove usages of visible attribute from Page This is a legacy attribute that was used to show the page in the navigation. Since the render_navigation helper has been removed and the feature has been replaced with a much better feature (Menus) we do not need this attribute anymore. Also this attribute was used to generate the url of a page only taking visible parents into account. This also has been removed. commit 3730ddd Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu Jun 4 00:04:28 2020 +0200 Fix page status in page info dialog commit 44c4a3f Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed Jun 3 00:48:21 2020 +0200 Remove attach_to_menu feature The attach-page-to-menu button in the page form was meant as a transitional feature for introducing menus. Now that they have been established and managing menus has been refined we can remove this rather complex feature. commit 9a19906 Merge: b60c75f daa78e3 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Fri Jun 5 11:41:17 2020 +0200 Merge pull request AlchemyCMS#1874 from tvdeyen/upgrader-fixes 5.0 Upgrader fixes commit daa78e3 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu Jun 4 23:37:40 2020 +0200 Fix the add menu_type migration This migration fails being rolled back because change_column is not reversible. Using `change_column_null` resolves that issue. Also it does not make sense to write into a column we delete any way. commit 9f18b95 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu Jun 4 23:32:12 2020 +0200 Fix the order of upgrade tasks If we run the dedecated 5.0 upgrade tasks before installing the migrations it will skip installing them. Since it is not harmfil to run the migrations before hand and this was the case for the upgrader all the time this fix should be considered fine. commit a67c632 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu Jun 4 23:30:33 2020 +0200 Do not seed while upgrading The Alchemy seeder does not need to run. commit b60c75f Merge: dc242d9 a43c8de Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu Jun 4 09:14:55 2020 +0200 Merge pull request AlchemyCMS#1863 from AlchemyCMS/depfu/update/rubocop-0.85.0 [ruby] Upgrade rubocop to version 0.85.0 commit dc242d9 Merge: c4b6d59 5238788 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu Jun 4 09:12:55 2020 +0200 Merge pull request AlchemyCMS#1872 from tvdeyen/remove-url_nesting-config Remove url_nesting config commit 5238788 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed Jun 3 23:54:32 2020 +0200 Remove url_nesting config commit c4b6d59 Merge: bf9ecd0 c8fcfba Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed Jun 3 21:43:00 2020 +0200 Merge pull request AlchemyCMS#1871 from AlchemyCMS/depfu/update/sassc-2.4.0 [ruby] Upgrade sassc to version 2.4.0 commit c8fcfba Author: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com> Date: Wed Jun 3 14:46:19 2020 +0000 Update sassc to version 2.4.0 commit bf9ecd0 Merge: 5d630bc 51a7d82 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed Jun 3 10:44:06 2020 +0200 Merge pull request AlchemyCMS#1867 from tvdeyen/4.6-backports Cherry picks changes from 4.6-stable that needs to be ported over to master Fix the sitemap wrapper height (AlchemyCMS#1861) Update Urlname translation (AlchemyCMS#1857) Introduce Page#url_path (AlchemyCMS#1859) Show url_path in page tree (AlchemyCMS#1856) Use depth for page tree serializer root_or_leaf (AlchemyCMS#1864) commit 5d630bc Author: Alexander ADAM <alexanderadam@users.noreply.github.com> Date: Wed Jun 3 09:18:24 2020 +0200 fix GitHub Actions spelling (AlchemyCMS#1869) commit 51a7d82 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue May 19 00:16:44 2020 +0200 Reduce horizontal padding of small button commit bb0c50d Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue May 19 00:12:21 2020 +0200 Add active button style commit 86e59cc Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue Jun 2 23:45:26 2020 +0200 Use depth for page tree serializer root_or_leaf (AlchemyCMS#1864) Depth is a cached attribute on the page that does not need calculation and will always be correct even if the root page has been removed. This commit helps to migrate to Alchemy 5 without making further changes to the page tree serializer. Without that change page trees that already have been migrated to "root-page-less" Alchemy 5 will have page toggle switches disappear in the first level. commit 961fdc7 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue Jun 2 22:34:33 2020 +0200 Show url name in Page tree (AlchemyCMS#1856) * Show url_path of page in admin page tree The url_path of a page is useful information. We should always display it not only if the page redirects to external. * Format sitemap.scss with Prettier * Change the sitemap urlname background color The old color was too prominent for that information. * Show a legend on top of admin page trees * Use a left aligned column layout for page tree * Slighty more space for node page name and url * Eager load associated records in page tree serializer Now that we need the language and its site we should eager load them in the page tree serializer. Also the locker of a page should be eager loaded. On a site with ~300 pages loading the page tree went from 722ms to 221ms on my machine. commit c801a36 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue Jun 2 00:49:51 2020 +0200 Introduce page.url_path and use it for alchemyPageSelect (AlchemyCMS#1859) * Introduce page url_path service class Use this class to generate the url_path to a page. It takes several circumstances into account 1. It returns just a slash for language root pages of the default langauge 2. It returns a url path with a leading slash for regular pages 3. It returns a url path with a leading slash and language code prefix for pages not having the default language 4. It returns a url path with a leading slash and the language code for language root pages of a non-default language * Return the page url_path with API responses We want to use the newly introduced url_path attribute on the page selector in the admin. It in general makes sense to have the correct url to a page from the API anyway. * Remove @url_prefix This variable is not used anymore. since we generate the url in page links via the API response. * Use Page#url_path in alchemyPageSelect We do not need to care about adding leading slashes in the template anymore and it fixes a lot of missing features for multi language pages. * Use page.url_path in node.url Instead of having (buggy) page url generating code in the node model, we use the newly introduced page.url_path attribute that takes all necessities into account. * Appease Rubocop * Use page.url_path in page link dialog And with that fix bugs for wrongly generated urls in multi language environments. commit 68c7e02 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu May 28 00:44:06 2020 +0200 Update urlname translation to URL-Path That's what this part of the URL is called according to RFC 1738 commit 40ce6ae Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu May 28 00:43:02 2020 +0200 Use Slug as urlname field label The value entered in this field is the slug. commit e75927f Author: Thomas von Deyen <thomas@vondeyen.com> Date: Sat May 30 00:03:47 2020 +0200 Fix the sitemap wrapper height We want the loading spinner centered. commit 9105536 Merge: 2767a66 21a1028 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed Jun 3 00:01:15 2020 +0200 Merge pull request AlchemyCMS#1844 from tvdeyen/remove-url_nesting Remove url_nesting configuration and always create nested urls commit 2767a66 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue Jun 2 23:30:52 2020 +0200 Use apt update instead of apt-get in GH action (AlchemyCMS#1866) We have some weird connection error on GH actions while installing the database headers. Let's try to use a more modern tool... commit a43c8de Author: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com> Date: Tue Jun 2 17:22:53 2020 +0000 Update rubocop to version 0.85.0 commit 21a1028 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu May 21 10:10:49 2020 +0200 Remove the url_nesting config option And always created nested urls. commit 2f15aba Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu May 21 09:16:57 2020 +0200 Deprecate url_nesting configuration commit de453c5 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed May 27 11:14:10 2020 +0200 Set proper nested set scope on page (AlchemyCMS#1837) * Set proper nested set scope on page * Ensure layoutpages factory never creates a parent With the awesome nested set scope set to language and layoutpage there is no parent with the same scope to move the newly created page to. * Ensure page factory sets language from parent If the page has a parent set we use that as the language. We must avoid to call the parent method in the factory, that's why we use the @cached_attributes here. * Fix page language_root factory for when language is nil We might set language to nil in tests explicitly. * Refactor page specs after factory changes Now that the page factory sets the language to the parent if necessary we can rewrite some specs. commit c7dad35 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed May 27 10:43:59 2020 +0200 Remove active_record_5_1? (AlchemyCMS#1854) This check is not neessary anymore since we dropped support for Rails 5.0 and 5.1 commit 50f19ea Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue May 26 20:26:29 2020 +0200 Use Alchemy npm package instead of hacking webpacker (AlchemyCMS#1853) * Move npm package code into dedicated folder We want to get rid of webpacker * Remove rails/webpacker With that we can dramatically simplify the jest setup * Raise npm package version * Install alchemy npm package into host app Instead of compiling the pack in a hacky way we install the alchemy/admin npm package as dependency of the host apps package.json and copy the admin entry point into the host apps packs folder. This reduces the amount of hacks we need in Alchemy in order to make webpack work. * Remove webpacker hacks Now that we publish a npm package and install alchemy/admin as host app dependency we can remove our webpacker hacks. * Remove and ignore webpacker files from dummy app We want to run the install generator during test setup. * Run Alchemy installer during test setup That way we ensure that everything is setup correctly and the generator is actually tested in a sort. * Cache node_modules of dummy app on CI This gem has two node_modules folder now, on in the dummy app and one for the jest specs. commit 913d3dd Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue May 26 15:20:22 2020 +0200 Fix node select ES5 syntax (AlchemyCMS#1851) * Do not use object destructering in node select This is not supported in ES5 * Format node select with Prettier commit 14625b7 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Tue May 26 10:29:34 2020 +0200 Remove male sign after emoji (AlchemyCMS#1849) The wizard can be gender neutral. commit 5397826 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Tue May 26 10:29:17 2020 +0200 Run yarn:install after installing webpacker in install generator (AlchemyCMS#1850) Without doing this, the app will not find Alchemy's webpack packs. commit 84ac809 Author: Mikael Norlén <mickenorlen@gmail.com> Date: Mon May 25 23:22:54 2020 +0200 Add indifferent access to default options in encoded_image (AlchemyCMS#1840) commit fe36e20 Author: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com> Date: Mon May 25 23:19:48 2020 +0200 Update rubocop to version 0.84.0 (AlchemyCMS#1845) Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com> commit f7ffece Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Mon May 25 13:21:59 2020 +0200 Do not use ES6 Syntax in Node Selector (AlchemyCMS#1846) The previous version of this code fails in host apps that do not have Uglifier in Harmony mode. Let's stick with ES5 instead. commit 73963dd Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Tue May 19 09:12:11 2020 +0200 Translated root menus (AlchemyCMS#1825) * Add menu_type column to nodes This column holds information about what type this menu is - a footer or a main menu, for example. * Make menu_type available in the admin This adds the following functionality: - Choose a menu type when creating a new root node - Change the menu name for a root node if that's necessary or desired via `edit` - Restrict the options for menu type depending on which nodes on a language are already present * Render child nodes directly in nodes partial The "options" local is often not given, and the `node_partial_name` key is never set any longer, as it is always `node.to_partial_path`.` * Render footer in Dummy App This can be used to test Alchemy::EssenceNodes from the Dummy app. commit 6a08040 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Mon May 18 20:55:37 2020 +0200 Fix deleting an EssenceNode from a content (AlchemyCMS#1834) We can leverage Rails' functionality here. commit 3e4d476 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Mon May 18 20:54:58 2020 +0200 Use Rails standards for deleting pages from EssencePage (AlchemyCMS#1833) Rails offers ways for setting relations, let's use them. commit 2cb3228 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Mon May 18 20:53:27 2020 +0200 Install Webpacker in install generator (AlchemyCMS#1835) We use this generator in the Alchemy ecosystem, and the dummy apps of gems like alchemy-devise or alchemy-solidus need webpacker installed to function. commit 02983a0 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Thu May 14 14:52:15 2020 +0200 Scope has one site (AlchemyCMS#1832) * Make alchemy_pages.layoutpage null: false We want to have an actual Boolean and no nil values. * Scope Language Root Page to Non-Layoutpages Layoutpages can not be root pages. commit 8ff8ca2 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Thu May 14 14:23:52 2020 +0200 Add error flash to resource controller (AlchemyCMS#1827) This adds an error flash to the resource controller if some action does not succeed. commit f25b8e5 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Thu May 14 10:37:23 2020 +0200 Render nodes (AlchemyCMS#1831) * Allow directly rendering nodes We can use Rails' model rendering mechanism to render nodes by changing `to_partial_path` to not point to the wrapper, but to the node itself. This yields a few simplifications. * Adapt generator partials to not use node_partial_path This is now `node.to_partial_path`. * Actually render node when rendering an EssenceNode commit f58f4f9 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Wed May 13 23:43:33 2020 +0200 Add errors when node cant be deleted (AlchemyCMS#1828) * Add error before destroying node with attached essence Nodes that are used on e.g. content pages can not be simply destroyed. This commit adds an error message so the user knows what's going on. * Do not destroy nodes with dependent nodes that are in use on a page This moves the validation up in the file so that awesome_nested_set does not run its `delete_all` callback before we validate that it can do that. It also extends the validation such that we collect all the pages that are referenced in the subtree below this node. commit 729cd21 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Wed May 13 16:53:11 2020 +0200 Fix Association between Nodes and EssenceNodes (AlchemyCMS#1826) There was a typo here resulting in Nodes being associated to themselves in an impossible way. commit 0eec65a Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Mon May 11 09:36:14 2020 +0200 Add a quick Node select (AlchemyCMS#1821) * Add a quick Node select This faster select also shows the ancestors of each node, such that one is not confused between nodes that have similar names. * Fix Copy-Paste error that tries assigning Pages to EssenceNodes Prior to this commit, saving an EssenceNode by ID would never work... * Serialize Node with Ancestors for initial selection * Center initial selection in Alchemy::EssenceNode select Maybe we should look at using Flexbox for this so we can center things more easily. * Add specs for NodesController Index Action It's always good to have specs. commit 30c2aa8 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Fri May 8 23:13:51 2020 +0200 Add has_one association for root page (AlchemyCMS#1820) This should allow us to preload better, and I believe Rails will also cache the association if necessary. commit 81ae05f Author: Thomas von Deyen <thomas@vondeyen.com> Date: Fri May 8 22:53:12 2020 +0200 Use rails root in install generator (AlchemyCMS#1822) * Move generators out of rails folder * Use Rails app root to join paths Without that it is not always ensured that the path is the hosts apps root path. * Refactor elements generator naming validation commit 5a86ae5 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed May 6 23:30:07 2020 +0200 Make page.language mandatory (AlchemyCMS#1818) Now that we removed all hidden "systempages" we can ensure that a language is always present on a page. commit 6fccc3b Author: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com> Date: Wed May 6 17:54:46 2020 +0200 Update babel-jest to version 26.0.1 (AlchemyCMS#1819) Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com> commit 4b43ce8 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed May 6 14:38:15 2020 +0200 Remove root page (AlchemyCMS#1817) * Remove Page#systempage? * Remove Page.root We do not need a single root page. All pages that share the same language are a nested set. * Format page_scopes.rb * Format pages controller spec file * Add upgrader task to remove root page * Rubocop -a commit dc7b25d Merge: 19aa55f 2196e80 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Wed May 6 13:13:52 2020 +0200 Merge pull request AlchemyCMS#1807 from mamhoff/remove-site-id-from-nodes Remove Site ID from nodes commit 19aa55f Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed May 6 13:02:56 2020 +0200 Remove Page.ancestors_for (AlchemyCMS#1813) Its only used by the render_breadcrumb helper and that could just use the self_and_ancestors scope. commit 2196e80 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Wed May 6 10:22:17 2020 +0200 Add Down Migration commit 8b7cd55 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed May 6 00:57:37 2020 +0200 Fix page unlock page icon replacement (AlchemyCMS#1816) Without this strong selector it happens that more icons get appended than necessary. Also rewritten in VanillaJS commit c7261e8 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed May 6 00:57:17 2020 +0200 Invoke rake task in upgrader instead of system call (AlchemyCMS#1815) commit 6d9e5d8 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed May 6 00:56:57 2020 +0200 Remove old 4.4 upgrader class (AlchemyCMS#1814) commit 12c97fe Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue May 5 20:53:40 2020 +0200 Remove layout root pages (AlchemyCMS#1812) * Remove layout root page We do not need this hidden page. All pages that share the same language and have `layoutpage` set to true are the layoutpages for the current language. * Pass the language in new page form We want to be sure that the language we instantiate the page with gets passed with the form * Only set the language from parent if present And use the current page, not the default (that is the current anyway if no current language has been explicitely set). * Add upgrader for removing layout root pages commit 9a67a36 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue May 5 17:52:22 2020 +0200 Use timestamps method in migration files (AlchemyCMS#1811) Instead of an database dependent datetime column, we should use the Rails database agnostic timestamps method for creating the columns. commit afd266d Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue May 5 17:49:51 2020 +0200 Remove legacy element serializer (AlchemyCMS#1810) This serializer has been introduced 4 years ago with the release of Alchemy 3.1. This can be safely removed now. commit 34b1721 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue May 5 17:12:08 2020 +0200 Remove timestamps from essences and contents (AlchemyCMS#1809) * Remove timestamps from essence and contents tables These records always ever get created within an element. So, this information is duplicated. * Format attachment and picture model classes with Rufo * Touch element after essence has been saved The content will rarely be cached inside of an already cached element. * Format attachment and picture spec files * Touch elements after attachment or picture has been saved Do not touch contents any more. We removed the timestamps as they only get created in the context of an element and the element gets cached, not the single content. * Rubocop -a commit c206a2a Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue May 5 12:24:50 2020 +0200 Remove stamper from content model (AlchemyCMS#1808) The content model always ever is created within an element and it does not make sense to have this information twice. commit 09abf7b Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Tue May 5 12:21:43 2020 +0200 Add Alchemy::Language.has_many :nodes (AlchemyCMS#1806) We need those association declarations for better preloading. commit ba1acf5 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue May 5 09:18:54 2020 +0200 Drop Rails 5.0 and 5.1 support (AlchemyCMS#1805) * Drop Rails 5.0 and 5.1 support These Rails versions are not officially supported anymore and we want to be able to better support MySQL with bigint foreign keys. * Use references in migrations for foreign keys That way the database adapter will chose the correct column type for foreign keys. Adds better support for MySQL. Closes AlchemyCMS#1796 commit a6f3640 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue May 5 08:53:04 2020 +0200 Remove acts_as_list from Content (AlchemyCMS#1798) Closes AlchemyCMS#1793 commit 4b60c7b Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Mon May 4 23:10:24 2020 +0200 Remove Site ID from nodes Nodes can get their Site through their language. commit 9301a06 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Mon May 4 23:31:27 2020 +0200 Remove enforce_ssl (AlchemyCMS#1804) Removes the enforce_ssl configuration and the SSLProtection module. Please use the Rails build in config.force_ssl or your Webserver for that. commit 09f3041 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Mon May 4 23:30:39 2020 +0200 Remove stamper from essences (AlchemyCMS#1802) We do not need the creator and updater information on the essences. We already have them on the elements. commit 7596a48 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Thu Apr 30 11:36:11 2020 +0200 Make the preview url configurable (AlchemyCMS#1803) * Make the preview url configurable By default Alchemy uses its internal page preview renderer, but you can configure it now to be any URL instead. Basic Auth is supported as well. Example config/alchemy/config.yml preview: host: https://www.my-static-site.com auth: username: <%= ENV["BASIC_AUTH_USERNAME"] %> password: <%= ENV["BASIC_AUTH_PASSWORD"] %> This is great for static sites. * Satisfy the Hound commit 1e95b31 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed Apr 29 21:54:56 2020 +0200 Use Rufo to format all files in a consistent way (AlchemyCMS#1799) * Rubocop -a * Fix rubocop config * [Rufo] Add trailing commas * [Rufo] Use double quotes for strings * Add Rufo as local dev dependency commit 7a79235 Author: Martin Meyerhoff <mamhoff@gmail.com> Date: Tue Apr 28 12:52:14 2020 +0200 Add EssenceNode (AlchemyCMS#1792) This Essence can be used to add a menu and its children to an Element. commit 489181e Merge: 5093856 28876c6 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Mon Apr 27 08:34:43 2020 +0200 Merge branch 'fix-email' commit 5093856 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Mon Apr 27 08:28:08 2020 +0200 Convert NodeTree into ES6 (AlchemyCMS#1782) * Install sortablejs npm package * Revert "Add favicon to assets manifest" The favicon is already linked with the images folder. * Convert NodeTree and utils into ES6 modules And make the `on` delegated event handler work with multiple base nodes * Fix base node folding * Extract ajax and events into own utils modules commit addc211 Author: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com> Date: Wed Apr 22 11:25:37 2020 +0200 Update rubocop to version 0.82.0 (AlchemyCMS#1785) Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com> commit 37d7737 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Wed Apr 22 10:40:49 2020 +0200 Use 2.5.7 of code climate coverage reporter GH action (AlchemyCMS#1790) * Use 2.5.7 of code climate coverage reporter GH action * Raise mysql service health check retries This service takes for ever to start commit 4433ede Author: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com> Date: Wed Apr 22 09:51:36 2020 +0200 Update sassc to version 2.3.0 (AlchemyCMS#1787) Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com> commit 5d8ae3b Author: Thomas von Deyen <thomas@vondeyen.com> Date: Fri Apr 17 08:51:14 2020 +0200 Fix regular icons (AlchemyCMS#1784) * Fix Font Awesome regular icons It's `asset_url` not `assets_url`. * Update icons to Font Awesome 5.13.0 Aka. the Corona release commit e246432 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Tue Apr 7 21:38:24 2020 +0200 Add Webpacker (AlchemyCMS#1775) * Install webpacker and configure own instance Following the official webpacker engines guide * Add demo admin JS pack Something to work with during testing * Serve and compile Alchemy packs in host app Serve the Alchemy packs via Rack::Static if public file server is enabled (ie. during development) and enhance the yarn:install and assets:precompile tasks so that the Alchemy packs get compiled asd well. Copy over the files into host apps public/ folder afterwards. * Ensure that we run yarn install before installing Alchemy * Ensure to also serve packs in tests * Install node modules on GH CI * Do not use our own webpacker instance in page preview We want the webpacker instance of the host app in the preview frame. * Use webpacker 5 * Add a prettier config * Add a webpack-dev-server proxy * Only enhance rake tasks that are present If you install webpacker into a fresh Rails app there is not yarn:install task yet. * Update Babel config and add core-js * Add and configure Jest * Run Jest specs in GH CI * Convert i18n module into ES6 * Add favicon to assets Sprockets complains that we need this file * Enable Jest coverage reports for code climate * Ignore unknown window messages Now that we have Webpack installed the dev server emits messages on the window as well. Lets just ignore them. commit 28876c6 Author: Thomas von Deyen <thomas@vondeyen.com> Date: Sun Feb 23 15:12:55 2020 +0100 Fix email in gemspec
What is this pull request for?
Rails offers ways for setting relations, let's use them. This also fixes deleting a page from an EssencePage.
Checklist