Jump to content

gornycreative

Members
  • Posts

    351
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by gornycreative

  1. I take advantage of some of the extra metadata from google's json to group things into selects. But doing the downloads directly via spoofing the browser in the header like you do in RockFrontend is SOOOO much handier than downloading the font family from G and doing fontsquirrel webpack or whatever. Most of the time I use licensed fonts but for the times when I don't need to this is very handy.
  2. FYI I'll be giving some more love to the 'light mode' display in the next version, I don't really like how rules are treated and some styles don't reflect contrast coloring as they should. I don't think the 43% contrast threshold is aggressive enough - some pretty low contrast results get through. I'm also looking at providing an $options array that would optionally remove the broad selection of choices and just give the backend a single theme dropdown with however many presets you'd like to use.
  3. Sure... I was just fixing up a little bit of repeatermatrix font color styling on the inputfield side. This is a dark mode duotone standard vibrance. Here's the same in light mode: Here's a contrast standard dark mode sample from another dummy site. So you can see how TinyMCE works in its one of its editing modes. I did set up one of them to respect dark/light mode. Haven't done them all because I like having the option to flip the script? Here's a lighter one. Still a little work to do obviously - there's text that need recoloring, and a few borders need cleanup. I'm going to just keep tweaking it until it is consistent. One thing I was thinking about this morning was setting a dark v light default alert background/text scheme. I know that if you violate a constraint you still get the default white background alert - so I'll probably roll out a change in the next couple of days to work that out.
  4. Admin Style Chroma This module provides a user interface to control the colors and typography of the AdminThemeUIKit backend theme for ProcessWire 3.0. The requirements are: PHP >= 7.x ProcessWire >= 3.0.179 AdminThemeUikit >= 0.3.3 Less >= 4 InputfieldColor >= 1.1.6 Installation The module can be installed from the Modules Directory or from the zip file archive from the main branch. When you first install the module, you will be taken to the configuration page that consists of four panes: Chroma Scheme Colors Using the color selectors, you can select the first color - your main color - and a second color if you wish - your accent color. Only the first color is required. The default color scheme installed by the module is a grayscale dark mode theme. Your main color does not got modified and gets applied to principal interface elements. If you are currently using the rock.less style as your admin style, this color gets applied to the @rock-primary LESS variable. Your second color gets desaturated. Current Palette Results In the background, depending on your mixer type either one or both of your color selections will be calculated and applied to eight master colors. These colors are displayed here. Your first color choice is applied without any modifications to palette color 3. Your second color choice (when applicable) is desaturated and treated according to your mixer type selection and applied to palette color 6. In general, colors 1-4 are applied to interface elements and their hover states. Colors 5-8 are applied to backgrounds and muted states. In UIKit parlance: Primary color = @chroma-lum-sat-3 Secondary color = @chroma-kum-sat-1 Muted color = @chroma-lum-sat-7 Default color = @chroma-lum-sat-6 Contrast rules are them applied to these colors to get regular and strong labels that are used to assure correct contrast to applied. Please Be Aware: The accessibility contrast threshold of 43% (the LESS default) is applied, but it is still possible to select color combinations that will evade readability scores from Google Lighthouse. Below the current palette dots you will se sample swatches and their hover states can be activated. Chroma Scheme Options The selections made here will alter the LESS files imported into the final admin.css and will either calculate a second color from the first one your select or use the second color. Color Mixer Type There are several mixers included. I'm always interested in other viable additions. Future versions of this module will likely include an ability to add your own custom select options to the interface to reference your own LESS include files. Single : This mixer mode takes your first color, and desaturates it in order to get the second color needed to build the theme palette. Contrast : This mixer mode takes your first color, negates it and desaturates it in order to get the second color needed to build the theme palette. Duotone : This mixer mode takes your first color and uses it to build out the top half of the palette, and takes your second color, desaturates it slightly, and uses it to build out the bottom half of the palette. Cool Harmony : This mixer takes your first color and spins its hue counterclockwise on the color wheel to get the second color and uses it to build out your color palette. Warm Harmony : This mixer takes your first color and spins its hue clockwise on the color wheel to get the second color and uses it to build out your color palette. Luminance Direction Light to Dark (Dark Mode) : This mode sets the palette to run from light colors at 1 to dark colors at 8. When using duotone, the light to dark ordering applies to each 4-color block individually. When using single color mode, the secondary color is a darkened version of the main color. Dark to Light (Light Mode) : This mode sets the palette to run from dark colors at 1 to light colors at 8. When using duotone, the dark to light ordering applies to each 4-color block individually. When using single color mode, the secondary color is a lightened version of the main color. Vibrance Level While the secondary color is always somewhat desaturated, you may wish to dial down or dial up the saturation depending on the text contrast requirements of your color theme. Subdued : The most aggressive desaturation level. Standard : Reasonable desaturated for most applications. Vibrant : The least desaturated settings, though still slightly desaturated. Chroma Scheme Fonts The drop down selectors here will detect css stylesheets found in your ste/assets/fonts or site/templates directory. If you use RockFrontend to download your Google Fonts, it will detect these fonts as well. If you select "No Custom Font" for either the Header Font or the Body Text Font, the default AdminThemeUiKit font rules will apply. Add Google Fonts This feature makes use of a modified version of Bernhard Baumrock's method (found in RockFrontend) for procuring Google Font files and saving them on your server. After looking at his references on CSSTricks is was pretty clear that the header manipulation approach was going to be the best one. When first installed and run, the Admin Style Chroma module will download json lists of Google Font options and cache them in your site/assets directory. There is currently no method in place to check for new fonts, so if for some reason you are not seeing a Google Font you want to use, deleting this file should force the module to repopulate it: /site/assets/AdminStyleChroma/google_fonts.json The Google Fonts are downloaded by individual family and saved along with their CSS file in: /site/assets/fonts/{family}/{family}.css If you select font variants beneath the dropdowns, these values will be passed to the request. If you do not specify which font variants you want, Google will return the defaults for that font family. If you which to include special italic/oblique variants for each weight, set the option appropriately. If a variant does not exist for a given weight, Google will attempt to serve the closest weights available. If you make selections (or don't) and select a font that you have already downloaded before, the previous family files will be overwritten. PLEASE NOTE : If you download a lot of fonts, this process could take some time. Style Compatibility A lot of styles have already been corrected. A number of styles within the ProcessWire core that use plain css or scss have been overwritten via specificity. A 'chroma' class is also added to the body tag, which drives many of the newly inherited classes, but due to the design of some features of certain modules there are other classes defined outside of the heirs of this class. I'm not always happy with how warnings appear. Future versions will address these issues. I've included many rules to provide support for the following areas: Tab Wrappers Page lists and actions Radios, Checkboxes and Selection Colors Selections, Marked text Panels and widgets Image related popups Awesomeplete RepeaterMatrix TinyMCE Interface Tracy Debugger Page Hit Counter Release Note Changes Admin On Steroids Admin Helper Search Engine Color Spectrum Easy Repeater Sort Page View Statistics Nette Tests All changes here are entirely superficial quality of life style improvements. The functionality is not altered. Depending on your TinyMCE settings you may see these improvements but you may not. I've made changes that address quirks that I have personally seen. I am always open to adding rules for other modules where the styles are off or assume a white background. I hope one day we will have a proper discussion of less/css normalization for module authors, but even when that occurs it is hard to say how we will retrofit older modules, etc. For now, this is a patchwork process.
  5. I tried to apply the setPageName() magepage method in a custom page class - the field saves and updates but seems to force the page to an unpublished state. Trying to publish the page has no effect. I can use other updating methods - for example, setting the title field value in onSaveReady() - and it saves and leaves the status, but perhaps there is something special happening because of the name field getting saved? This is using v3.29.0 of RockMigrations and PW 3.0.224
  6. I'm guessing this is the intended behavior, so this might be a feature request more than a bug. I ran into an issue with a module where there was an asmselect inputfield that I was trying to add additional options to and they kept reverting. What was odd to me was that I don't believe any migrations were actually running, but the options array that I had included in the installModule call kept returning and overwriting my changes. The watched file containing the module installation calls had not triggered as far as I can see in the logs, but the options array values kept overriding my attempts to expand the selections. (It says the file was skipped). Is there a way to set the options for a module on installation so that you can choose between setting a locked-in configuration or just setting default/initial settings for the module? EDIT - I realized that the reason the installModule was installing the options repeatedly was because I placed the install in the init() for a custom page class. I should move it to the migrate() at least or perhaps put additional checks in place to determine if it is necessary to populate an options array.
  7. Testing in the latest Firefox on windows 10, I get no lag at all. Although I do get a weird cursor line flicker - not sure that is normal - that follows from the top left of the window corresponding to the cursor editing area in the panel. I'm guessing there is a bit of memory/interference being caused by the new security features in chromium-based browsers. This include at least Chrome and Brave browser - haven't tried Bing yet.
  8. Nice I'm guessing this is how we could use the addFunction method also?
  9. Here's my panel list - maybe we've got a common panel causing realtime lag? Are you using UserActivity?
  10. I thought I was the only one. Keyboard lag is brutal with the latest chrome. I figured it was chrome's new inbuilt 'privacy protection' spy features.
  11. v1.0.2 should work for combo fields now. I made a few changes and switched to saving the entire page and not just trying to save the Pagefile. Regaulr image fields and combo fields with image fields both should be working.
  12. So I can get calculations on images in combo fields on the fly, I'm having trouble saving the data back into filedata - still waiting to hear back from someone who is better with Combo to help there. I've tried a lot of different methods but it looks like there are extra hooks tied to the combo that throw errors similar to what you were seeing. I can put out a version without the caching feature for combo fields if folks want it - I would just recommend being relaxed with the quality because you will be doing real-time calcs each time. Regular image fields are not affected by any of this.
  13. What seems to be the issue is that when an image field in a combo field triggers the hook method the event object is not the original image field but the combo parent which seems a little off. I'll drop a few questions in the Profield forum and see where we get.
  14. I am a profields user so I will take I look. Can you give an example of the call that is throwing the error? Never mind, I see the issue. When I grab the unformatted field value for the event gives back the combo field itself, not the image subfield within the combo. I'll see what I can figure out.
  15. I didn't realize there are technically two pages created in the back end for search and both of them are hidden and have system ids - 300 and 1000, There's a search page under root '/' that's id 1000 and a search page under /*adminhome*/page/ that is id 300 - for admin search. When I used the name selector by itself in the Tracy console before it grabbed the admin search page but later when I used the template selector it grabbed the public search page. The public facing search page applied the custom SearchPage page class. I'm in business. id=300, name=search, template=admin, = the backend search page/process id=1000, name=search, template=search = the frontend search page/process - and the custom page class gets applied to this page.
  16. Funny thing is, the migrate function will still run and if I set it up as a magicpage for rockmigrations it still functions in that capacity. It's just the page class itself that does not get recognized when loading the search page.
  17. Looking into it more, I have come to the conclusion that the Search page uses the admin template and as a result falls outside the public facing page class framework. Even though the output from the controller/view is a ProcessWire/Page class, there is no way to extend the pageclass because it is the Process that dominates the function of the page. If I wanted to modify the Search workflow I could hook into it, but because I actually want to grab url segments and run some query magic to convert them into a complex query to pass to search, I think I will need to set up a unique page and pageclass to do that. Hopefully someone with more knowledge of the admin side can chime in.
  18. I noticed the search template and search page do not seem to be alterable by defining a custom page class. If I try creating a page class file where class SearchPage extends Page { it does not appear to effect the Search page class at all - the page still appears as ProcessWire/Page and none of the public functions I define can be used. Is this a feature of having a page that uses a Process or is it because it is a system file, or is there a different class it should extend?
  19. Me neither! I thought I'd play around with it. Just over here breaking stuff...
  20. Hi! EDIT Sorry this is on v 4.25.5 Running a bardump on the front-end for a variable (in this case, I'm passing a latte_vars array for verification) throws a type error: That $object_or_class array is:
  21. Hello, I was originally going to include this as part of my forthcoming AdminStyleChroma module but decided to roll it out as its own module. https://github.com/solonmedia/ImageColorThief Please check out the readme for a deeper explanation - but the short version here for now: This module adds two new methods to the Pageimage class, allowing you to extract the main dominant color or a palette of prevalent colors from an image. You can use the entire image to evaluate color dominance, or you can use a select swatch from the image based on inset rectangles from the edges, blocks at each corner, or a swatch centered on the focus point if you choose to use it. You can also select the granularity of the quantization to get more accurate color results. This is not an eyedropper algorithm - the colors are close approximates. Great if you have color schemes you'd like to coordinate with the headliner or seasonal images, or if you'd like to be able to sort a gallery of images by dominant color, etc. Looks real nice, for example if you are running a ken burns style image fade background and the images are sorted by a channel, etc. How to sort them? Ugh that's something I haven't tackled - yet: https://www.alanzucconi.com/2015/09/30/colour-sorting/ It works on JPG, GIF, PNG and WEBP images. It outputs RGB, HEX, RGB Integer, raw Array with R, G, B elements or an object. Once I've got myself registered and whatnot I'll submit it to the Modules Directory. Installs from zip for now: https://github.com/solonmedia/ImageColorThief/archive/refs/heads/main.zip I'd consider it Beta - the underlying libraries are pretty stable but I'd like to run a few more tests on input. Let me know if you have any questions/thoughts.
  22. Okay I think I found a way - it is circuitous but it seems to work, so I will post it for posterity in case anyone else is trying to mess around with saving similar data in this way... //This is for use INSIDE a method being added via Pageimage::addHookMethod but Pagefile should work in a similar manner //Grab the event object. $f_pageImage = $event->object; //Grab the page the event object lives on. $page = $f_pageImage->page; //Grab the unformatted version of the pageimages array the event object lives in from the field $u_Images = $page->getUnformatted($f_pageImage->field->name); //Grab the file inside the unformatted field content array that has the same filename as the original file objects filename $pageImage = $u_Images->getFile($f_pageImage->basename);
×
×
  • Create New...