tpr

AdminOnSteroids

Recommended Posts

It's doable I think, but the question is what is the default user behaviour, save or publish?

You mean very new pages or pages left unpublished for a reason, and then hitting ctrl+s?

  • Like 1

Share this post


Link to post
Share on other sites
3 minutes ago, tpr said:

pages left unpublished for a reason

This one and not just brand new pages. I think it does not really matter what the previous life of the page was if we went to keep it Unpublished.

5 minutes ago, tpr said:

default user behaviour, save or publish?

I vote for "save only behavior" so that users new to AOS do not trip over it accidentally just like I do :-[ I'm not new to AOS but last time I did not notice that I published the page and it was so for more than a week... :( Those who are confident enough could switch to the current behavior but that does not include me anymore.

Share this post


Link to post
Share on other sites

v162 is uploaded, changelog here. The docs still needs to be updated (FieldOverrides and the new Branding logo feature at least). 

  • Like 1

Share this post


Link to post
Share on other sites

FYI, in case it's not obvious, it's a file compiler issue. Something to do with the line breaks. I have come across this once before. It's a pain, but an easy fix.

Share this post


Link to post
Share on other sites

Thanks, I reformatted that part, hopefully it's OK now (for me it didn't appear).

  • Like 1

Share this post


Link to post
Share on other sites
39 minutes ago, tpr said:

Thanks, I reformatted that part, hopefully it's OK now (for me it didn't appear).

Looks good at my end - thanks.

Share this post


Link to post
Share on other sites

Thanks tpr!

I'm not seeing any PHP errors, but I'm still seeing some display issues.  When viewing the AOS's module settings page with AdminThemeUikit, the enabled modules boxes are to big and the screen scrolls a lot because of it.

To fix it, I had to add to src/aos_config.scss

// fix AdminThemeUiKit from expanding the min-height at runtime
.InputfieldContent.uk-form-controls{
  min-height: auto !important;
}

There are couple of others small issues, but I'll follow up on Github.

  • Like 1

Share this post


Link to post
Share on other sites

In v165 sticky header is available for the Uikit admin theme too along with a compact (smaller, better name anyone?) masthead, plus Profile page links to configure themes (SuperUsers only):

aos-165.png.03b307599d14a9f7841ea55cde261bb4.png

  • Like 2

Share this post


Link to post
Share on other sites

Thanks @tpr - great having the sticky header.

Another one of those File Compiler annoyances that needs a   to fix:

Add links to configure admin theme settings on Profile \ProcessWire\page(SuperUser only)

  • Like 1

Share this post


Link to post
Share on other sites

Thanks, I re-worded that sentence, hopefully that works too (cannot see here the issue).

  • Like 1

Share this post


Link to post
Share on other sites
4 minutes ago, tpr said:

Thanks, I re-worded that sentence, hopefully that works too (cannot see here the issue).

Yep, that fixes it - thanks!

  • Thanks 1

Share this post


Link to post
Share on other sites

Only to mention: I know that AOS is not full supporting the new UIKit Theme, but I think I post it nevertheless.

With the new UIKit Theme the description of the fields that are usually shown inside an overlay will be displayed on the left side of the field too.

screenshot-www.juergen-kern.at-2017-11-10-19-42-14.png.01ec8ddfe990e59f5f37f0f03af685c0.png

The hover function works also. This is fe a description of a pagetable field. As you can see the description will be displayed in a small column on the left side.

Best regards

Share this post


Link to post
Share on other sites

I've just added a feature similar to PrevNextTabs module, creatively named as prevNextLinks :) 

It's largely based on @Macrura's module but there are some differences too:

  • links are added next to the page title which is imo less error-prone
  • on the last page the first children is linked and on the first page the last, so there are "Edit prev/next/last/first" links based on the current position
  • under the hood links are added to the DOM via JS, which made it much easier to position them and to serve all 3 admin themes (default, Reno, Uikit)
  • there is no option to exclude/include templates

aos-prevnextlinks.jpg.4015aef310150e56988e31e6d4556de6.jpg

@Juergen

Thanks, I'll have a look

  • Like 5

Share this post


Link to post
Share on other sites
4 hours ago, tpr said:

I've just added a feature similar to PrevNextTabs module, creatively named as prevNextLinks :) 

this is great!  the only issues i see with the links being next to the title is that they will jump around from page to page, whereas if they stay in 1 place, you can click through the siblings without moving the mouse.

I like the fact that it goes back to the beginning/end also – that's helpful..

  • Like 1

Share this post


Link to post
Share on other sites

That's true but I think it wouldn't be used to quickly cycle through pages.

My first idea was to put these links before the title but that would make the title look odd, though I can change it if there's a need.

Share this post


Link to post
Share on other sites
15 minutes ago, tpr said:

My first idea was to put these links before the title

Maybe the arrows could float right next to the Save button? Besides not moving so much between pages, on the default theme it would also have the benefit of less confusion with the breadcrumb separators (which look quite similar).

2017-11-14_184202.png.302618aeb22c4bf3040bac284735c40d.png

2017-11-14_184104.png.9e4a18f05923a567b7ceb9dc64e86873.png

  • Like 2

Share this post


Link to post
Share on other sites

That would work, but there is an aos tweak to move the save btn next to the title. But perhaps prevnextlinks could be placed to the far right then, will think of it.

  • Like 3

Share this post


Link to post
Share on other sites

hello @tpr

I have discovered an issue with search box in page table field and updating the page table field via Ajax.

Before:

screenshot-www.juergen-kern.at-2017-11-14-11-21-02.thumb.png.fa23735cd7cecbc89407c31b70bbf4a1.png

The search box is there

 

After updating the page table via Ajax (a child page was edited in modal and then saved):

screenshot-www.juergen-kern.at-2017-11-14-11-22-03.thumb.png.7243aee5602337e88a75e43c162a431e.png

As you can see the search box is gone. After refreshing the page the search box is still there.

I have also troubles with this behavior by using a InputfieldPageTable::render hook (see https://processwire.com/talk/topic/17738-tip-how-to-change-the-table-headers-in-page-tables/). It seems that that the hook doesnt hook in if the field will be updated via Ajax. My attempt was to try to run this hook in init.php but I was not successful.

Share this post


Link to post
Share on other sites

Hello @tpr

If you can confirm the behavior written in the previous post, @Robin S helped me out at my similar problem to get it working. Running a slightly modificate code inside init.php instead of ready.php will solve the problem. Maybe its a solution you can also use if you can confirm this behavior. For the solution please click the link to my problem in the previous post.

Best regards

  • Like 1

Share this post


Link to post
Share on other sites

Filter boxes are added via JS so there is no hook there as I remember. Because of this the JS init code needs to be run on ajax change. I rarely use pagetables but I'll reproduce the issue somehow.

  • Like 1

Share this post


Link to post
Share on other sites

Hello @tpr

You can ignore this "bug". It was caused by a page table hook inside ready.php on my side. After changing my code it works as expected. Maybe there was some interference :(. Now my code and AOS work as expected - I am happy.:)

Share this post


Link to post
Share on other sites

Hi @tpr,

I've been having intermittent problems when using the save hotkey. I get the overlay but the form is not submitted. It's been happening on remote sites and on localhost, but I'm not sure exactly what version of AOS I first noticed the issue with. There are no errors in the browser console when the issue occurs. Browser is Chrome on Windows. Tricky one to debug because it only happens intermittently - just thought I'd mention it in case others have been experiencing it too.

I'm wondering if the behaviour of the save hotkey could be a little less restricting so if an issue like this does occur the interface is not locked and the save button is still accessible. Currently I have to use my browser dev tools to remove the height and width from the added pseudo-element and allow pointer events. 

Share this post


Link to post
Share on other sites

Do you have a field with html5 validation that prevents the Save action to perform? Aos triggers the Save button so this is what I can think of.

I have modified this feature a few weeks ago to trigger Save instead Publish when creating a new page but I don't think this is the culprit. I needed to modify things under the hood to take the DOM order into account, to find the Save btn first on new page.

I guess I can show the save overlay for a second and then remove.

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   0 members

    No registered users viewing this page.

  • Similar Content

    • By Macrura
      This is a new module, hope to release soon, which allows extended field descriptions, in currently 2 ways.
      The main feature of the module is that you can have a short description and then a 'more...' link which drops down a longer block of text.
      This is achieved by separating the intro/visible text and the rest with 5 dashes.

      Example setup:

      the 2nd way is if you are using AdminThemeUiKit, you can show extended field instructions in a panel. The content of the panel is edited on a regular PW page. This use case would probably not be that common, but if you had a field that required some extended instructions for how to use, this could be useful; Also, since this allows you to target information and instructions down at the field level, it could reduce the amount of documentation needed on a global level, since it is a lot more context targeted.

    • By netcarver
      Part 1 of a 2 part Module & Service Reveal.
      I'm currently working on a new module: ModuleReleaseNotes that was inspired by the work I originally did on making Ryan's ProcessWireUpgrades module "release" aware. In the end, I decided to ditch the approach I was originally taking and instead work on a module that hooked in to the UpgradeConfirmation dialog and the module edit page.
      Aims
      My aims for this module are as follows...
      Make discovery of a module's changes prior to an upgrade a trivial task. Make breaking changes very obvious. Make reading of a module's support documentation post-install a trivial task. Make module authors start to think about how they can improve the change discovery process for their modules. Make sure the display of information from the module support files/commit messages doesn't introduce a vulnerability. Looking at these in turn...
      Making discovery of a module's changes prior to upgrade a trivial task.
      This is done by adding a "What's changed section" to the upgrade confirmation dialog.  This section takes a best-effort approach to showing what's changed between the installed version and the updated version that's available via the module repository.
      At present, it is only able to talk to github-hosted repositories in order to ask them for the release notes, the changelog file (if present) and a list of commits between the git tag that matches the installed version and the tag matching the latest version.
      It will display the Release Notes (if the author is using the feature), else it will display the commits between the tags (if tagging is used by the module author) else it will show the changelog file (if present) else it will show the latest N commits on the master branch (N, of course, being configurable to your liking.)
      An example of the Github Release Notes pulled in for you, taken from Mike Rockett's TextformatterTypographer Module...

      An example of a tag-to-tag commit list from the same module...

      An example of a changelog - formatted to show just the changes (formatting styles will change)...

      Finally, an example of a fallback list of commits - sorry Adrian ...

       
      Making breaking changes obvious.
      This is currently done by searching for a set of configurable search strings. Later versions may be able to support breaking change detection via use of Semantic Versioning - but this may require some way of signalling the use of this versioning standard on a module-by-module basis.
      For now, then, you can customise the default set of change markers. Here I have added my own alias to the list of breaking change markers and the changes section of the changelog is styled accordingly (these will be improved)...

       
      Make reading of a module's support documentation, post-install, a trivial task.
      This is done by making some of the support files (like the README, CHANGELOG and LICENSE files) readable from the module's information/settings screen. There is an option to control the initial open/closed state of this section...

      Here is Tracy's README file from within the module settings page... 

       
      Make module authors start to think about how they can improve the change discovery process for their modules.
      There are notes in each of the sections displayed on the upgrade confirmation page that help authors use each of the features...

       
      Make sure display of external information doesn't introduce a vulnerability.
      This is an ongoing concern, and is the thing that is most likely to delay or prevent this module's release. Currently, output is formatted either via Markdown + HTML Purifier (if it was originally a Markdown file) or via htmlspecialchars() if it has come from a plaintext file.
       
      Ongoing...
      For now, I've concentrated on integration with GitHub, as most people use that platform to host their code. I know a few people are hosting their repositories with BitBucket (PWFoo comes to mind) and some with GitLab (Mike Rockett?) and I would eventually like to have adaptor implementations for these providers (and perhaps GitKraken) - but for now, GitHub rules and the other hosts are unsupported.
      I hope to have this ready for general release within the next week.
    • By blynx
      Hej,
      A module which helps including Photoswipe and brings some modules for rendering gallery markup. Feedback highly appreciated

      Modules directory: http://modules.processwire.com/modules/markup-processwire-photoswipe
      .zip download: https://github.com/blynx/MarkupProcesswirePhotoswipe/archive/master.zip
      You can add a photoswipe enabled thumbnail gallery / lightbox to your site like this. Just pass an image field to the renderGallery method:
      <?php $pwpswp = $modules->get('Pwpswp'); echo $pwpswp->renderGallery($page->nicePictures); Options are provided like so:
      <?php $galleryOptions = [ 'imageResizerOptions' => [ 'size' => '500x500' 'quality' => 70, 'upscaling' => false, 'cropping' => false ], 'loresResizerOptions' => [ 'size' => '500x500' 'quality' => 20, 'upscaling' => false, 'cropping' => false ], 'pswpOptions' => (object) [ 'shareEl' => false, 'indexIndicatorSep' => ' von ', 'closeOnScroll' => false ] ]; echo $pswp->renderGallery($page->images, $galleryOptions); More info about all that is in the readme: https://github.com/blynx/MarkupProcesswirePhotoswipe
      What do you think? Any ideas, bugs, critique, requests?
      cheers
      Steffen
    • By mtwebit
      Tasker is a module to handle and execute long-running jobs in Processwire. It provides a simple API  to create tasks (stored as PW pages), to set and query their state (Active, Waiting, Suspended etc.), and to execute them via Cron, LazyCron or HTTP calls.
      Creating a task
      $task = wire('modules')->Tasker->createTask($class, $method, $page, 'Task title', $arguments); where $class and $method specify the function that performs the job, $page is the task's parent page and $arguments provide optional configuration for the task.
      Executing a task
      You need to activate a task first
      wire('modules')->Tasker->activateTask($task); then Tasker will automatically execute it using one of its schedulers: Unix cron, LazyCron or TaskerAdmin's REST API + JS client.
      Getting the job done
      Your method that performs the task looks like
      public function longTask($page, &$taskData, $params) { ... } where $taskData is a persistent storage and $params are run-time options for the task.
      Monitoring progress, management
      The TaskerAdmin module provides a Javascript-based front-end to list tasks, to change their state and to monitor their progress (using a JQuery progressbar and a debug log area). It also allows the on-line execution of tasks using periodic HTTP calls performed by Javascript.

       
      Monitoring task progress (and log messages if debug mode is active)

       
      Task data and log

      Detailed info (setup, task dependencies, time limits, REST API etc.) and examples can be found on GitHub.
      This is my first public PW module. I'm sure it needs improvement
       
    • By netcarver
      A very simple textformatter that was inspired by Diogo's RemoveHeight textformatter.
      This one strips the height from any images and either adds a custom class or adds a max-width:100% as an embedded style.
      Github: https://github.com/netcarver/TextformatterFluidImages
      PW Repo: To Be Confirmed.