Jump to content
ryan

Weekly update – 8 January 2021

Recommended Posts

1 hour ago, szabesz said:

I guess you meant "copied over to" instead of "uploaded to", correct?

Thx, i've corrected that in case your wording is more clear 🙂 

1 hour ago, szabesz said:

Anyway, I like this idea. If there was a central and configurable image browser (the image sources could be defined by the developer), so that admin users can re-use images by copying over images of a page to another page than that would help. Such a feature has its cons of duplicating the image, but on the positive side there would be no need to manage dependencies.

Exactly. Sounds good to me in your wording as well 🙂 Not sure how the image reference field works, though. I've never found time to give it a try...

  • Like 1

Share this post


Link to post
Share on other sites

@Zeka 

Currently you can create a class like BlogPostPage and it automatically be used as the class for all pages using template "blog-post". You mentioned the PagesType class, which is used by things like Users ($users), Roles ($roles), Languages ($languages), etc. as an alternative to the $pages API var. To make sure I understand what you mean, are you saying that you'd like to be able to create a class like this:

class BlogPostPages extends PagesType {}

And then you'd get this API var ($blogPostPages) that limits itself to pages using template "blog-post":

$posts = $blogPostPages->find("date>last year, sort=date"); 

Is that what you mean, or something different?

  • Like 3

Share this post


Link to post
Share on other sites
8 hours ago, ryan said:

@Zeka 

Currently you can create a class like BlogPostPage and it automatically be used as the class for all pages using template "blog-post". You mentioned the PagesType class, which is used by things like Users ($users), Roles ($roles), Languages ($languages), etc. as an alternative to the $pages API var. To make sure I understand what you mean, are you saying that you'd like to be able to create a class like this:


class BlogPostPages extends PagesType {}

And then you'd get this API var ($blogPostPages) that limits itself to pages using template "blog-post":


$posts = $blogPostPages->find("date>last year, sort=date"); 

Is that what you mean, or something different?

Yes, something like this. Thanks.

  • Like 2

Share this post


Link to post
Share on other sites
On 1/8/2021 at 9:54 PM, ryan said:

Flexible content or page building 

One of the most common themes has been that people want more content building options as an alternative to using a rich text editor at one end, and page builder at another. This is a direction that some other CMSs have been going in (like WordPress), and one that many would like to see ProcessWire provide an option for as well.

(...)

First would be a flexible content block style editor in the core as an alternative to rich text editor that supports pluggable block types while maintaining best content management practices. If possible, we'd use an existing tool/library like editor.js or another as a base to build from, or potentially build a new one if necessary. To be clear, it would not be a replacement for CKEditor but an alternative approach supported by the core.

Please... just... don't. 😔
👉 https://wordpress.org/plugins/gutenberg/#reviews

We've been there 3 years ago with WP. The same discussion, the same requests.
The rest is history... or rather anoying present.

I've started using PW because of its bare bone flexibility as a backend and text/content editor (not builder!).
I don't know too much about all that PW API magic (which I truly admire) and barely scratch the surface,
but that's more than enough to build a lighweight customized website with a desired design (here just customized Bootstrap + few js libraries).
I don't need and I don't want any builders for that.
Clients are extremely happy with very simplified admin dashboards and some of them ran away from Gutenberg and other WP builders last year.

I'm perfectly aware that there are different clients, developers, trends and expectations.
I just feel (and see) that we're overcomplicating and overbuilding websites (and tools) these years...
Just sighing, Guys...

All the best to Ryan and the whole PW Community in 2021!

  • Like 1

Share this post


Link to post
Share on other sites

I know some things I have struggled with in the past is exporting fields from one website to another to jump start a project, and option fields can't be imported in.  I have to go to each of, say 20 fields, and manually copy and paste all options in for all of them. 

When I am working in a page backend in one tab, and have another tab open with the front end to see my changes, I can save the backend tab, and instead of staying where it is at, it shoots me to the top of the page.  This isn't great.  Would prefer it to stay there so I can tweak, save, tweak, save.  Most other backend system I don't even need to hit save as changes I am making are live, but this is a step in the right direction!  Also would be nice to have a way to not have to switch back and forth between tabs.

Getting live editing would be even better!  I even purchased the plugin for this and wasn't a huge fan of it.

  • Like 1

Share this post


Link to post
Share on other sites
54 minutes ago, Chris Ernovsky said:

Please... just... don't. 😔
👉 https://wordpress.org/plugins/gutenberg/#reviews

We've been there 3 years ago with WP. The same discussion, the same requests.
The rest is history... or rather anoying present.

I've started using PW because of its bare bone flexibility as a backend and text/content editor (not builder!).
I don't know too much about all that PW API magic (which I truly admire) and barely scratch the surface,
but that's more than enough to build a lighweight customized website with a desired design (here just customized Bootstrap + few js libraries).
I don't need and I don't want any builders for that.
Clients are extremely happy with very simplified admin dashboards and some of them ran away from Gutenberg and other WP builders last year.

I'm perfectly aware that there are different clients, developers, trends and expectations.
I just feel (and see) that we're overcomplicating and overbuilding websites (and tools) these years...
Just sighing, Guys...

All the best to Ryan and the whole PW Community in 2021!

I dont think anyone here is wanting gutenberg.  Take a look at this video.  Its basically just the PW backend in a side window instead of full page so you can see what you are editing while you are editing.  That way you dont scroll down to a box, save, get shot back up to the top, switch tabs, hit refresh.  All that is wasted time.  You just edit the box and see the changes.

Now, once the editing experience is updated, I think it would be nice to be able to have 2 sets of children for each page.  One for the page path/child pages/url, and one for the design rows/sections on that page. 

So the tree would have a page path mode, and a page design mode that shows children of the page, based on the mode you are in.  In the design mode, children of that page would be rows on the page, path mode would be child pages.

ie. When I edit a Category page in path mode, maybe it has a text field for Page Title and Page Description, which have nothing to do with design, and its children are the products in that category. 

If I edit that same category page in page design mode, the first child page is called Intro Section, and has fields for design related settings for that row.

I think this would be the best approach becuase the api would have a clear support for adding fields for both view modes, but not force anyone to use anspecificic front end framework or theme.  It would be nice to have a slider field time for font sizes. 

  • Like 2

Share this post


Link to post
Share on other sites

Better private pages for note-taking, intranets, extranets: I happen to use ProcessWire as public as well as a private note-taking tool. While ProcessWire works really well as a public website, the private website is harder.

  • As a webmaster I want to protect the entire site, a branch (root page and it's children) or a page so that I know my page(s) stay private. Much like Adrian's Page Protector module.
  • As a webmaster I want the page tree to show if a page is protected so that I don't worry if it's protected.
  • As a webmaster I want page protection to be built-in and work with Page Status.
    page-status.png.687c6020a4c73de76bcb28c76c3a74b6.png
  • As a web designer I want to present public pages to visitors and public+protected pages to permitted users.
  • As a webmaster I want to grant access / permission to specific users and roles.
  • As a webmaster I want to ensure that private / protected pages stay private. Today I might easily publish a page by mistake (when using Unpublished status to control private pages):
    publish-btn.png.baaa4e56d6b5a4e00c70242fd02a23d4.png

Benefits: This change will make ProcessWire attractive in a whole new game (intranets, extranets, note-taking, private online knowledge-bases and much more).

  • Like 1

Share this post


Link to post
Share on other sites
9 hours ago, joer80 said:

I think it would be nice to be able to have 2 sets of children for each page.  One for the page path/child pages/url, and one for the design rows/sections on that page.

Interesting approach. It deserves further investigation, I think. If I understand it correctly, you propose another set of children – separated from the current set – which is used for layout only perhaps?

10 hours ago, Chris Ernovsky said:

some of them ran away from Gutenberg and other WP builders last year.

Reading other's comments, I think most of us do not ask for a "Gutemberg only like" feature, instead, most of us need a way to implement a builder which is similar to the current repeater(matrix) based solutions others have presented in the forum, but geared towards layout + building.  Editor.js could simply be another fieldtype, just an alternative to CKEditor. You and/or your client could decide which one to build upon your "RTE editing needs".

  • Like 3

Share this post


Link to post
Share on other sites
11 hours ago, Chris Ernovsky said:

Please... just... don't. 😔
👉 https://wordpress.org/plugins/gutenberg/#reviews

We've been there 3 years ago with WP. The same discussion, the same requests.
The rest is history... or rather anoying present.

I've started using PW because of its bare bone flexibility as a backend and text/content editor (not builder!).
I don't know too much about all that PW API magic (which I truly admire) and barely scratch the surface,
but that's more than enough to build a lighweight customized website with a desired design (here just customized Bootstrap + few js libraries).
I don't need and I don't want any builders for that.
Clients are extremely happy with very simplified admin dashboards and some of them ran away from Gutenberg and other WP builders last year.

I'm perfectly aware that there are different clients, developers, trends and expectations.
I just feel (and see) that we're overcomplicating and overbuilding websites (and tools) these years...

Just my five cents (or fifty, looking at the length of this answer):

There is zero interest here to move ProcessWire away from what it does now, or somehow get rid of the way it handles structured data. Absolutely zero. If you're worried that someone wants to thrash the system we now have and replace it with a Gutenberg clone, fear not: that will not happen, period.

Now, as you've pointed out, there are different use cases. Almost all the sites I build and clients I work with nowadays require a "builder" approach: flexibility in terms of laying pages out. CKEditor goes to some extent here, but it's riddled with issues, and honestly the experience can be pretty horrendous: image management in particular is a lacklustre, and embedding any type of dynamic content (or anything CKEditor doesn't handle itself) gets difficult/technical (short codes with params etc.)

A couple of reasons why comparing what we're doing to what WP is doing with Gutenberg makes little sense:

  • In WordPress Gutenberg is going to replace the "classic editor", and it's also going to replace a lot of other built-in tools (such as menu management GUI) in the long term. The ultimate goal there is a "full site editor". This has very little to do with what we're discussing here.
  • WordPress has never (natively) provided custom fields. Instead they have predefined fields and (freeform) page meta. ACF and similar plugins that make custom fields possible are popular, but page builders are even more so. It makes sense for the core team to extend the core with the tools that most users seem to want.

I could get into the reasons why Gutenberg reviews are so bad — such as there being a lot of history, a lot of resistance to change, a lot of misunderstanding, likely mostly developer votes while the feature itself is aimed more at content editors, and so on — but I won't.

My point is that improving the ability of ProcessWire to handle flexible layouts is not going to take anything away from those who don't want or need that. ProcessWire has many things that some users don't need or use. For an example, I've never used front-end editing for client sites. It's a feature I don't need, so I don't use it. It's as simple as that 🙂

52 minutes ago, SwimToWin said:

Better private pages for note-taking, intranets, extranets: I happen to use ProcessWire as public as well as a private note-taking tool. While ProcessWire works really well as a public website, the private website is harder.

  • As a webmaster I want to protect the entire site, a branch (root page and it's children) or a page so that I know my page(s) stay private.

I'm going to cherry-pick one thing from this list: "I want to protect the entire site" 🙂

I've worked on many completely non-public sites. While I believe I get the reasons @ryan has for not allowing the home page to be non-public, I would absolutely love for this to change. Even if it required a hook or config setting, that'd be a very nice addition. Currently I'm doing this with custom code, but there are some negative implications and I'm always a bit worried that it'll break: first of all it's (my) custom code and if something changes there's always a slight possibility that it won't work as expected, and second of all it needs to be done with hooks (to protect assets and make sure that nothing can interfere) and can thus sometimes get a bit complicated.

TL;DR: if there was an option to somehow protect the entire site so that all non-authenticated requests (home page included) result in a login request, I'd be one happy user 🙏

  • Like 9

Share this post


Link to post
Share on other sites
16 minutes ago, teppo said:

TL;DR: if there was an option to somehow protect the entire site so that all home page requests result in a login request, I'd be one happy user

Is it in the requests repo yet? If not, if you add it I'm happy to give it a thumbs-up 🙂

From now on, GitHub thumbs-ups are the way to go: 

 

Ryan says: "Please use the thumbs-up votes on GitHub for issue reports and feature requests that you value the most, and going forward, that will help us to cover them in a useful order."

I guess it also means we should not use the heart or any other positive looking reaction as GitHub seems to be able to sort on one reaction only, that is why it is only useful to stick to thumbs-up.

 

  • Like 3

Share this post


Link to post
Share on other sites
36 minutes ago, szabesz said:

Is it already in the requests repo? If not, if you add it I'm happy to give it a thumbs-up 🙂

From now on, GitHub thumbs-ups are the way to go:

I have a lot of thumbs-upping to do... 🙂

Anyway, I couldn't find related request right away. I know this has been requested and discussed on various occasions but I assume it's not such a common need that anyone would've yet opened a request for it in the "new" repository, or perhaps those asking about it here or googling for this found an earlier answer and figured that it'll be unlikely to change.

Here's a new request: https://github.com/processwire/processwire-requests/issues/376.

  • Like 5

Share this post


Link to post
Share on other sites
6 hours ago, teppo said:

There is zero interest here to move ProcessWire away from what it does now, or somehow get rid of the way it handles structured data. Absolutely zero. If you're worried that someone wants to thrash the system we now have and replace it with a Gutenberg clone, fear not: that will not happen, period.

This is EXACTLY what I had to hear. Thank you! 🤞🙌

I'm open to any new approaches and improvements with .js editing/building as an option.
Just don't want to lose my new, beloved home... ☺️

  • Like 3

Share this post


Link to post
Share on other sites
24 minutes ago, SwimToWin said:

Sometimes, webmaster might choose to use a set of fields as "Page Title" and so it makes sense to loosen the data model and change the Page dependency on Title field from standard to optional.

The title field is already optional. You just need to make it non-global by editing the Title field and unchecking the Global checkbox on the Advanced tab. Then you can remove it from any templates where you don't need it.

If you want to see the values of other fields (instead of Title) in Page List you can set that on the Advanced tab when editing the template.

2021-01-17_100140.png.96727ba8c537cf84a2451ab9c40dee93.png

  • Like 5
  • Thanks 1

Share this post


Link to post
Share on other sites

I use PW on multiple websites that I admin and write content for. I'm therefore often updating my PW sites, either by writing new content (most commonly) or doing template coding, or coding other features such as logic-specific ad display. Based on my experiences across all my websites, here are my thoughts on the OP topics:

Flexible content or page building - I've never needed it and can't see myself using it in the future. I already have a few things set up like footer content where I write footer-left, footer-middle, footer-right content as the body of non-templated pages, and I simply code my footer to display the body content of those 3 pages using what's already in the PW core and API. Easy, and perfect.  I don't see any need for anything beyond that, such as flexible content or page building (for my purposes at least). I absolutely love the CKEditor 🤩 and I'm not sure why or what use case anyone would want for a block editor (in fact, a block editor is a reason why I moved away from WP to PW - the WP block editor was slow and frustrating and I could achieve way faster content creation with PW). I have a few page templates where there are multiple "body" contents, and I simply use additional "body" style fields in those templates. I understand the PW CKEditor is not going to be replaced, so I'm not worried there, but I'm not doing anything that ever needs more than defining fields and displaying them with a template.

Admin theme improvements - a really quite massive "pain point" for me across all my sites is the inability to order the page tree in PW admin in a way other than the default 😭. When you have 90+ pages of content (which I do on several of my sites and hope to on the others later), not being able to specify a default order is very frustrating. Sure, for a 20-page site, no big deal. For anything more, it's quite hard. In particular, I'd like these 2 features:

  1. The ability (or the default) to be most recently created page at top (not the oldest created page which it seems to default to - it's basically in the reverse order of what I want.) And yes, there is the "recent" menu available in Admin, but that's not as helpful as you might think.
  2. The ability to put some "sticky pages" always at the top of the page tree. For me, this would be regarding specific to ads I want to show/edit frequently, but I expect there are other people with other use cases who want certain pages to always appear at the top of the page tree. This feature is of equal or higher importance to me than changing the default order.

File/media manager and more file sharing options - Yes, BUT ONLY if we can somehow specify a different alt field for an image each time that a central image is used in a new page. If that's not possible, then I'd rather stay on the default of having to re-upload the same pic separately for different pages (which is what I'm doing now anyway). For me, it's crucial that the image if used freshly in a new page, has a fresh image alt tag. Because you might want to re-use the same pic for slightly different reasons in each case.

External file storage - I don't use this and can't see myself ever using this, although I can see how others might want it. I purposely like having everything on one host/location.

Live preview and auto-save:

  • Auto-save is certainly nice, but ONLY IF it does not over-ride a user-specified save. I sometimes change page content around, but then decide I don't want those changes, so I purposely don't save it. In this case, auto-save could cause me big problems if it saves the page when I did not want it to. On the other hand, I've lost content before by my own fault, by forgetting to save and then going away and my session timed out after I came back. So I certainly could use autosave as long as it saves the page in another location so as not to overwrite an existing page.
  • Preview options are already very rich, with "new tab" and "modal" options that I use frequently, so I cannot see a use for live preview for my use cases. The existing previews are pretty amazing already!

That's it from me. Of all the features, the page tree order in Admin is the most important and most pressing issue to me and my websites. All of that said, I love PW, and admin-ing my sites is a breeze thanks to PW and its wonderful community of people!

 

 

 

 

Edited by Violet
clarify admin theme page order info
  • Like 3

Share this post


Link to post
Share on other sites
5 hours ago, Violet said:

The ability (or the default) to be most recently created page at top (not the oldest created page which it seems to default to - it's basically in the reverse order of what I want.)

Just in case you don't know, you can do this via the parent page template's Family tab > Sort settings for children

5 hours ago, Violet said:

The ability to put some "sticky pages" always at the top of the page tree. For me, this would be regarding specific to ads I want to show/edit frequently, but I expect there are other people with other use cases who want certain pages to always appear at the top of the page tree.

This is possible with the AdminOnSteroids module's AddNewChildFirst option which allows you to maintain manual sorting, but automatically putting new pages on top.

BTW - not suggesting that something like this shouldn't be in the core - just hoping to help you out with a solution now.

  • Like 4

Share this post


Link to post
Share on other sites
On 1/12/2021 at 3:10 AM, ryan said:

Most likely I wouldn't be able to make any more commits to the core if I got run over by a train. I've always thought this was one of the reasons to use open source, ensuring that when someone smacks the tracks, the code doesn't. But it's not just about being open source, the code also has to be clean and well documented so that others can easily take it on board. That's one reason why I put so much effort into code quality and code documentation. My intention is that the code is always ready for others to understand and work with. As for commercial services/modules, it's the same risk inherent with any product or service you pay for. While not open source, the Pro modules do have the same code quality and documentation as the core, and are not obfuscated or encrypted. If it sets your mind at ease, I'm 46 years old (not 76), and am very healthy. I run and lift every day, eat lots of salads, don't eat red meat, and don't participate in any dangerous activities. Most likely I'll be here for at least another 46 years. But if I'm ever derailed then I know the project would still be in good hands.

46 you're still young Ryan 🙂 I'm 66 this year and active as a martial arts instructor, and I still want to do it for the next 20 years hopefully.

So you can maintain PW for the next 40 yrs. 😁

  • Haha 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   1 member

×
×
  • Create New...