Jump to content

gornycreative

Members
  • Posts

    384
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by gornycreative

  1. Hi @bernhard I'm getting caught up on updates and I was wondering if you were planning to add a variable array back into the Less and SCSS compile functions. In StylesArray back in the older version of RockFrontend you used to have a setvar function, and for debugging I also added a way to get variables (since these are sometimes calculated). Do you want me to add it back in an submit a PR?
  2. I think this module may be broken with the new site? I tried refreshing the modules list and got no dropdown.
  3. I am so very late to this party. I will not probably have a chance to dig deep into the dev default theme for some time. I like the functionality of adding a light/dark toggle. Having had to deal with uikit less and pw less and other things... hmm there is still a little bit of technical debt from Reno that occasionally appears. I've had to put in a number of overrides to manage different aspects for different plugins - core and wire. Not many have probably tried Chroma, but much of the complexity I felt necessary came from a lot of concerns I have read here - monochrome vs duotone, different text color globals. But Chroma is particularly opinionated - like dark mode, it's not for everyone. I have found this gets more complex with uikit because they recognized the need to preserve contrast across dynamic elements or transparent elements where a variety of images can make text color choice a challenge. But their inverse mode doesn't really accommodate for a true dark mode either - so I needed to work out my own method for overriding their style choices to get a functional dark mode. Color selection for most end-users is a nightmare to deal with. This was why I tried to implement very simple controls with opinionated math on the back to generate the palette necessary for uikit globals. While functionality and directing intent is paramount in the new design, if users can't read text or lack element cues that allow them to intuitively interact with the application the costs to handle user requests outweigh the feature. I appreciate the A/B tests folks are using, and sometimes just a little guidance from end-users goes a long way. I don't like working in isolation as a developer away from test users or non-technical people, but that's just my preference. As you work with color, remember you have a uikit kit style layer, then a pw style layer, and I guess there is now a dynamic css variable layer. I'm not against that design choice, as it makes a number of toggles possible to bring into the dynamic - but this also shifts the weight around a bit when it comes to bringing definitions client-side. When I get a chance to play with the mode and work it into Chroma, any overrides or variable splits I've had to build in terms of style will be available there. Thanks @diogo and @jploch for engaging this process. I look forward to seeing where it goes.
  4. Just a brief note for anyone following this theme, I have spent some time reading over the various discussions regarding the new default theme and I will need to dig in deeper before I implement any changes to accommodate CSS variables. For now, if you wish to use Chroma for the backend please select 'original' as your AdminThemeUIKit preference. I'm working out some better math for some color calculations to make them less prone to throwing contrast/accessibility errors.
  5. I totally forgot to do this. Sorry about that. If you are trying to set up something like this, I have uploaded a small zip that gives an example of how a few things could be done. _theme-options-tabs.php - this is my main settings configuration page. You can see I call a function file and then several tabs files. I broke out the tabs into separate folder/configs because it makes it easier for me to stay more organized as I add more features. _theme_fn.php - this is where my various functions live that construct a number of select options: getImageFields() - I use this in other places in my layout to determine where the main images for content types are to be found in a generic way - this way I can pick and choose which image fields I have on which templates and have a central source of truth to determine what order to grab a primary SEO image from. getEntities() - I use this to get a list of possible owners for the site - this setting gets used all over the place to trigger markup variation. getFontFiles() getFontFamilies() getFontSelectOptions() - I use these to look for fonts in a central font share and also look for font's added through either my Chroma backend theme or via RockFrontend, deduplicate families and provide a simplified options layout that include the css path for compilation into LESS elsewhere. If you look at the tab folders with configs, you can see how I call these functions to populate dropdowns. settings.zip
  6. Looks like that did the trick. Thanks! @Robin S
  7. Thanks @Mats - that's enough tinkering for now! 😄 1.0.2
  8. Ahhh so good. Date ranges would also be fun.
  9. Something else I noticed recently, when a page has two unsplash inputfields on the same template they are linked, so perhaps the js needs more granular selectors for the interaction layer so that each inputfield can operate independently. This module otherwise still works very well. I think pulling the data-id value from the element and attaching it to the `splashAndGrab` id on the fieldset in the js and form output will fix it. If I can get something working I will sub a PR. This was simpler than I thought. I want to test a few more things but I believe I got this working in a way that allows for multiple separate instances. Once I test a little more I will sub a PR.
  10. I started implementing this... and will incorporate some styling elements in the next AdminStyleChroma... One of the things I have run into - and this is a specific interaction with Pro modules so it may not be something you have encountered. If you use UserActivity and have the limit-save option set (which tries to only save changed fields) for some reason changes to EasyMDE fields are not always detected and do not always save. I haven't looked deeply into it, but I know that if I type content in manually the change is generally detected, but cutting and pasting content on its own usually does not register. If there is a timing swap between the control and the underlying form input, maybe make it shorter? I ran into something similar with the gradient module I did where, if User Activity is installed, I trigger a field change flag. I've tried typing manually, typing manually and then pasting content, pasting content alone, and pasting content and then typing and got inconsistent results. Turning off limit-save obviously removes the problem entirely. And it seems that waiting a certain amount of time also seems to give more consistent results. For the Grapick module I did a bit of a cheat where I add the class to the input that UserActivity looks for: //Will allow an inputfield to be picked up as changed when using the advanced features of UserActivity. pwStopsWrap.classList.add('InputfieldStateChanged'); This was set on the change function that gets called once a gradient color point on the UI is moved or the color is changed.
  11. It usually is not... thus the need for scripts like this (which I used regularly on WP back in the day) https://interconnectit.com/search-and-replace-for-wordpress-databases/
  12. I have been totally out of the loop working on a contract, but I saw the video release and now have read over this thread! Looks great, especially if you need to maintain public calendars. I was working around the code for FieldtypeRecurringDates but this looks like a full-featured alternative for appointments and other simpler event management. Something to think about, and it may already be on your roadmap but... For sites that include more extensive event descriptions, or reusable chunks of complex metadata or descriptions, it would be nice to be able to associate pages with an event - or perhaps an event rule? Is their an external page association you can set to an event/event rule in addition to the event title and description paragraph? Either from the calendar side via a page selector, or on the external page side from a multiselect dropdown field? It would be nice to be able to link an outside event information page - which describes everything - to an event on the calendar. I'll have to grab this later and see if there are some sync options to dev. Would be nice to be able to sync to a google calendar or acuity, bonsai, calendly, clickup, etc.
  13. A minor issue, but if a site isn't running multiple languages, the $language api var is null. There needs to be a null check on line 322 in the .module file, such as: if ($this->wire('languages')->count()) { $lang_id = $this->wire('languages')->getLanguage()->id; } to: if ($this->wire('languages') && $this->wire('languages')->count()) { $lang_id = $this->wire('languages')->getLanguage()->id; }
  14. Yeah custom page classes are absolutely essential to everything I put together. It's really nice to be able to populate interfaces for different page types this way - e.g. I have a jsonld method I attach to various page classes that allow me to segregate the structured data and custom tailor it for each class - but in various templates I can simple $page->jsonld() and not think about the schema more than once for each page class. I already know the right fields for a given page type will go in the right spots in the schema output.
  15. Cool yeah I agree re: cast vs loose comparison. I'm not entirely sure why it is getting stored/pulled as a string in my install, but it is. In terms of PageField vs field, this comes up if you have a braoder library of RepeaterMatrix types and need to iterate over the fieldgroup for the RepeaterMatrix - that field list gets a bit unwieldy (since it includes all fields for all matrix types for the given matrix). If I have an operation that iterates through the fields list, I've found it useful to test certain operations where Page content is being used to test for instanceof PageField - but that is probably a niche case limited to page builder assemblies... I don't think under normal circumstances it makes much of a difference.
  16. Nice to see it in the modules area! Thanks for putting it together! I have two notes from working with it. In my install it looks like the form id is stored in the field data as a string, not an integer, so the strict comparison on line 102 fails and I never get a selection for the dropdown from ___getFormOptions. Dropping the === to a == fixes this for me, I suppose you could recast the stored value also. There is no initial class set up for the inputfield - i.e. I'm using Admin themes and the UIKit class is not getting pulled into the initial load for the inputfield attributes. Something like this could be used to get whatever admin theme classes exist: /** * {@inheritdoc} */ public function ___render() { $attrs = $this->getAttributes(); //ADD $adminTheme = $this->adminTheme; if($adminTheme && method_exists($adminTheme, 'getClass')) { $attrs['class'] = $adminTheme->getClass('select'); } $value = $attrs['value']; unset($attrs['value']); return <<<EOT <select {$this->getAttributesString($attrs)}> {$this->___renderOptions($value)} </select> EOT; } The only other thing I was thinking about - and I haven't done a ton of dev with FormBuilder so there might be a good reason for this - but I was wondering why you built this using a select instead of storing it as a PageField? I like having the ability to display the form using other formats besides the raw name - maybe that's easier with this method? Anyways, thanks again!
  17. Although they have been bought by Canva, once I got used to how Affinity does things their Photo/Designer/Publisher trinity is my daily driver - particularly with the improvements finally brought to Publisher to make it feature complete with Serif's prior publisher (proper endnotes/footnotes support). And they do run on Linux with Wine and a bit of massaging: https://codeberg.org/Wanesty/affinity-wine-docs
  18. So I started playing around with Supermaven's free tier. If you are looking for a code assistant for VSCode I would recommend giving it a try. I started using it after Theo covered it in one of his tool videos, and I can say it probably shaves about 15 minutes of work per hour for me. It does a reasonably good job of anticipating structures you are building based on a quick overview of the codebase for your project. I haven't extended the codebase to include the entire source for processwire in my projects, but even with just the minimum core wire folder modules and a few site module source code bits it is more than enough to cover the bases. I am using the free tier which has a smaller token context limitation, but the code suggestions are fast, they don't feel inappropriately intrusive and don't write-ahead too far until the engine has high confidence in the direction you are trying to go. When it has high certainty, it opts to give you large code blocks - even entire functions with appropriate substitutions. It has sped up my RockMigration script writing considerably - beyond the macros, because it sees other migration functions I have defined and does a very good job of anticipating not only the class structures for custom page classes, etc, but also replacing names for new classes with proper singular/plural forms, etc. I'd say it provides the correct code without modification 85% of the time. https://supermaven.com/
  19. Yeah and I've been debating rolling my own styles and template also since I tend to try to use update UIKit or TW or whatever I am using and I have only started messing with FormBuilder, but I figure it may still be worth covering? Not sure.
  20. I was playing around with this today. A few things I noticed. ->styles and ->scripts return null, but I could pull the original form output and use the extractions from there. I get an AJAX response and the submission works, but the parsing of the whole page object returned didn't seem to work (the whole page replaced the original form on the page). I don't have any PR yet, just going to tinker now, but thought I'd report my findings. I should comment - I am using latte templates for output. I may need to hook into output markup somehow.
  21. It may depend on how you define your LESS variables, and whether you use CSS variables or not. This is something that the Wikimedia LESS and other frameworks run into from time to time - it's not unique to UIkit. Usually the strict math option resolves it because parenthesis are required to indicate math operators that LESS should evaluate - so I was surprised this was still choking, and it wasn't stopping on my custom mod LESS (partly because I had already quote escaped the math I needed to protect from LESS) - it was choking on stock UIKit source. The issue started for me with UIKit 3.18 I looked into whether the math setting changes may have an impact because of what others found on unrelated frameworks. In my particular case, I allow for dynamic type scaling in theme options based on variables, and I use dynamic font scaling to maintain line line lengths also. In my case when you allow LESS to do the math on its own it sometimes the parser is too greedy. I do wonder if using the up-to-date LESS.php package (I think it is 4.4.1 when I dug into it yesterday) would help, but I found it wasn't necessarily a direct drop-in for some reason. I ended up reverting to the default module.
  22. This is more just a reminder post than a problem post. If you have been having issues building UIKit from more recent repos it may be because the math setting in the currently used LESS.php wikimedia version is a bit greedy. Even after setting the 'math' => 'strict' option in the $less object it still gave an 'Operation in invalid type error'. I forgot that I needed to modify two files in order to get this to compile. base.less and article.less have two variable calculations that need to be quote escaped. Basically you need to turn this: @base-h1-font-size-m * 0.85; into this: ~'calc(' @base-h1-font-size-m ~'* 0.85)'; No matter how many times I write this someplace I forget that it needs to happen. So I am saving it here for the next time I desperately search for it.
×
×
  • Create New...