Jump to content

tpr

Members
  • Posts

    2,321
  • Joined

  • Last visited

  • Days Won

    44

Everything posted by tpr

  1. Perhaps you need to change this $pages->find("template=PriceSpy, sort=price, title=$item_title, limit=1") to this: $pages->find("template=PriceSpy, sort=price, title=$item_title")->first()
  2. Context Tools or Context Actions? Contextions? ?
  3. I would probably use such CSS instead: *:not(.pw-no-select) { user-select: text; }
  4. I just noticed this topic, here is a related post for the Cookie Management Banner where this issue was also present: Here you can find the location of the phrase-index.txt file too.
  5. I'm pretty sure it's about 80% done by now ?
  6. You have a tool for this - a text editor, see: https://css-tricks.com/almanac/properties/f/fill/
  7. Using native css variables would be nice, browser support according to caniuse is not that bad: https://caniuse.com/#feat=css-variables
  8. It should be sg like this: $user->language->name === 'en'
  9. tpr

    Tasker

    @nicolant could you try !$this->wire('modules')->isInstalled... instead?
  10. I guess you should set the rendered html to a twig variable in the php file.
  11. I like it, just a few observations: the pw-intro-screenshots are in JPEG, (optimized) PNGs would look better imo (no artifacts) the home page feels a bit crowded for me, especially the 4x2 blocks like the "Web developers love PW" and the "Clients love PW" sections. Some whitespace could help. slide-in, fade-in, etc animations: perhaps a bit too much, I would at least turn them off after the first appearance (if there's a way). Eg. scrolling up and down causes these animations to re-run, making reading text blocks harder (because you need to wait them to fully load).
  12. New in version 0.1.2: show test method and assertion count for passed tests display breadcrumb above test file name (configurable)
  13. Nice to hear that, thanks. As I wrote the additional filters will be modified a lot in the next release so if you use them a lot then updating will be harder. I try to release it in about two weeks but as always, time is not on my side ?
  14. Spoiler alert: I'm building a new module that contains a collection of markup generators and other small helpers, and just added a new "isAdminPage" method. This accepts a Page or a Page ID and defaults to the input url. Here is a screenshot of the tests and the method itself:
  15. Js is the way to go if you use cache as @bernhard suggested. However that will not ensure that the next random quote will be different than the previous, and with 30 items that would happen frequently. What I have done on my portfolio site is to - load all quotes to a js array - randomize this array - show quotes sequentially, and restart at the end
  16. I was able to use it via AdminOnSteroids module,even though displaying it on the frontend was tricky as I remember.
  17. I wouldn't recommend a gif (img quality, file size, maintainability etc) but rather a slider with separate images.
  18. That could work too, although once it's filled you cannot know for sure which format it uses (eg consider 12-12-2018 or 12/12/12), only if you clear the field.
  19. I've created a new documentation page with docsify. I was about to ship standalone markdown files with the module so they could be versioned and read through GitHub (or somehow else). Then I looked at @adrian's docs for Tracy and I liked it, especially the search feature, so I decided to go that route. The next release will contain a major rewrite for filters and macros. They contribute largely to the module's robustness (imo) and I wanted these functions to be available separately too. So there's a new "PWHelpers" class (name is not final) that contains methods that filters and macros are using. This means you can include this class in your non-latte PW projects too and use them if you wish. Another motivation was to make these functions testable which was not possible without this change. I wrote tests for almost every filter and macro. I spent significant time to it (testing is fun :)) and have fixed many bugs. Of course this doesn't mean they are bug-free but they are much safer to use and when a new feature is added I can easily check if everything works as expected (using ProcessNetteTester btw). I was thinking about making this class a separate module but I kept it inside TemplateLatteReplace for now, but I can change this later if there's a need.
  20. @adrian Probably yes, I've changed that, thanks. Yesterday I added a "translatorModal" tweak to Misc that allows editing translations in a modal, hope you find it useful.
  21. Yes, after indexing it goes to the select file page, I'm not sure why. I suspect that something is buggy in the indexing so a GitHub issue could be handy. Perhaps its only a missing html encoding but I haven't examined it in detail.
  22. Additionally using a modal to edit translations would be also handy ("Edit" button, "Bearbeiten" on the screenshots above). On closing the modal, the file list could be easily reloaded with triggering a reload event on the Inputfield. I'll probably add this to AOS if time allows. Update: added to v2.0.8
  23. I think I have found an issue which affects the "Live Search" feature of PW on edit language pages. The info for manually loading assets contains html markup, and even they are inside "```" quotes they make the Live Search choke ("invalid character at ..."). The JS error made the whole index file of Live Search outputted on the page and broke other JS functionality. It was not easy to track down, first I though it's AOS, then Tracy but finally it turned out to be this module (the reported line and column was not entirely proper). What made it even harder that you have to manually clear the Live Search cache and rebuild the index to test. This page can be found at "/setup/languages/edit/?id=1041", and the index file is at /site/assets/files/1041/.phrase-index.txt (use an existing language ID). First I tried to use only one "`" quote, then adding extra double quotes, etc. but nothing worked. Finally I replaced starting and closing html tags with their html entities and it worked well: array( 'type' => 'checkbox', 'name' => 'autoload_assets', 'label' => __('Autoload Assets'), 'description' => __('Autoload module CSS and JS files.'), 'notes' => __("If you disable this, you will need to load these files manually:\n```<link rel='stylesheet' type='text/css' href='/site/modules/CookieManagementBanner/assets/css/CookieManagementBanner.css' />\n<script defer src='/site/modules/CookieManagementBanner/assets/js/CookieManagementBanner.js'></script>```\nNOTE: you must load the JS file with the defer attribute."), 'value' => 1 ), Let me know if you need more info.
  24. You mean the console panel or the module config? You could add a checkbox which behaviour should be the default in the config page if you meant the console panel. The module config page in aos have become a bit large and it takes some time to load, just like in tracy debugger (at least on my not so new notebook). I'm not sure what could be done about that, perhaps simplifying some settings to a textarea key-value pairs? Or using ajax loaded tabs or else to break down settings to smaller parts?
  25. Not sure if you need this anymore and if I understand your issue properly, but this is how you can hook to get your custom translations. I use it for testing purposes in one of my modules, adding here too, perhaps somebody will find it useful. wire()->addHookAfter('LanguageTranslator::getTranslation', function (HookEvent $event) { $args = $event->arguments; // do something here... $event->return = "aa"; });
×
×
  • Create New...