This week in Orchard - 04/19/2019

Admin UI, Announcement, This week in Orchard

In our post we review the happenings after the Beta 3 release, then head to the open pull request of Orchard Core and see what will be merged soon, that will be available for the next release!

On Orchard 1.x

Style.Include and Script.Include register the wrong resource key in debug mode

When you are injecting resources using the Script.Include or the Style.Include methods, you have to pass the debug version for the first parameter, and the release version for the second parameter. Let's see the following code:

Script.Include("webfont.js", "head.deferred.min.js").SetAttribute("defer", "").AtHead();
Script.Include("jquery-migrate.js", "head.deferred.min.js").SetAttribute("defer", "").AtHead();
Script.Include("slick.js", "head.deferred.min.js").SetAttribute("defer", "").AtHead();

We have 3 separated js files that will be bundled when compiling in release, as a single js file but we want to render them as separated js files when developing/debugging. The ResourceManager.Include method registers the webfont.js as head.deferred.min.js causing the other files (jquery-migrate.js and slick.js) not to be rendered because they use the same key of webfont.js.

The ResourceManager.cs has a virtual RequireSettings method, where we return the following value:

resourcePath = FixPath(resourcePath, relativeFromPath);
resourceDebugPath = FixPath(resourceDebugPath, relativeFromPath);
return Require(resourceType, ToAppRelativePath(GetResourceKey(resourcePath, resourceDebugPath))).Define(d => d.SetUrl(resourcePath, resourceDebugPath));

Where a new method, called GetResourceKey has been introduced to decide when we need to return the release or the debug path of the requested resource.

Now there is an issue in Orchard Core too, to do the same thing when injecting resources in this way.

On Orchard Core

Docker images

If you navigate to the Docker Hub of Orchard Core you can download the updated docker images. Here you can see that the Windows version of Orchard Core has more than 5.0K downloads and the Linux version has more than 10K downloads! Both of the images have the following supported tags:

  • latest: The latest public release
  • 1.0.0-beta3: The latest release of 1.0.0-beta3
  • dev: The current development branch

NuGet packages

If you visit https://www.nuget.org/ and search for orchardcore, you will find a new package called OrchardCore. This is a new package, which is only available since Beta 3. You will see there are two packages because we merged on master and later on a new tag for beta 3 has been created to know which commit was Beta 3. And by creating a tag, AppVeyor restarted the build and republished everything on NuGet. We could change AppVeyor script to do not deploy or build on tags, just on commits on master.

The YamlDotNet is still a dependency for Orchard Core Beta 3, but we do not use it anymore. In the next version it will be removed, we just kept it for the migrations from Beta 2 to Beta 3, because we convert all the YAML files to JSON and we still need YAML for the conversion.

Open Pull Requests

When you navigate to Orchard Core's GitHub page and check out the open PRs, you will see that there are currently more than 50 open PRs waiting to be merged to the dev branch.

The reason for being as many open PRs is that these branches containing quite huge changes and by merging these into the dev branch could break some features of the framework. By being careful, we thought it would be better to merge these PRs after Beta 3 has been released. Now the Beta 3 is out, so it's time to merge these pull requests to dev branch! Let's see some of these!

Add custom Widget styles and classes with Flow

After this PR will be merged you can customize the classes and the styles for each widget in the flow. Technically, this PR provides Classes and Styles fields in the FlowMetadata on a Widget for users to add custom classes and styles to the widget container.

Features matrix

A list of features of Orchard Core, so people don't have to look for the available features and the ones that are currently in development or excepted for an upcoming version of Orchard Core. It could be good if they compare Orchard Core with other CMSs.

Add user avatar to the admin site

This PR is about to add the avatar to the top right with the name of the currently authenticated user. It could also be interesting to have a Liquid filter to generate a Gravatar.

RTL support for TheAdmin theme

This PR is using a Gulp pipeline that will convert the admin.css into RTL, by switching all the left margin to right margin and so on.

In this week there was an article about how Spotify implemented to support Arabic. They used a similar technique, but not using the same pipeline from the PR, they used PostCSS-RTL in their build step. It's the same process, but with a different library. It looks like this one solves the part of the issue that exists in the PR. It's not replacing the existing CSS, but extending it with more rules that are specific for RTL. It's one CSS which will adopt the look and feel based on RTL or not. It will let us do it automatically for any CSS that we want to instead of manually specify which CSS we want to include.

On Lombiq

Orchard Dojo Newsletter

Now we have 58 subscribers of the Lombiq's Orchard Dojo Newsletter! We have started this newsletter to inform the community around Orchard with the latest news about the platform. By subscribing to this newsletter, you will get an e-mail every time when a new post published to Orchard Dojo, including This week in Orchard of course.

Do you know of other Orchard enthusiasts who you think would like to read our weekly articles? Tell them to subscribe here!

If you are interested in more news around Orchard and the details of the topics above, don't forget to check out the recording of this week's Orchard meeting!

No Comments

Add a Comment