Jump to content

nodle

Clients
  • Posts

    819
  • Joined

  • Last visited

  • Days Won

    1

Reputation Activity

  1. Like
    nodle reacted to Matt for an entry, Introducing Invision Community 5's development tools   
    When planning Invision Community 5, we knew we had a unique opportunity to hit the reset button.
    It's hard to believe, but how we work with the framework has been the same since 2013. The priorities we held a decade ago no longer align with our current vision.
    The landscape of modern frameworks has evolved, and we have adapted accordingly.
    When we initially designed the Invision Community 4 framework all those years ago, our goal was to create an open development platform. We aimed to empower you with the ability to extend virtually every function we built, granting complete freedom to shape our UI, workflows, and functionality according to your needs.
    However, over the decade, we have realised that this freedom has inadvertently become a prison. While monkey patching allowed the overloading of any method we had written, it came at a significant cost. Even the slightest change to our original method signatures could break an entire community, forcing you to update your applications.
    Ironically, the more we strived to enhance our framework, the less stable your applications became.
    We dismissed requests for proper workflows like extensions, webhooks, and event listeners, urging you to rely solely on method overloading, often having to copy chunks of code just to add a few lines of your own.
    Invision Community 5 represents a much-needed reset. It is a moment to reassess everything we know about extending frameworks and construct definitive pathways and workflows that serve you better.
    Our aim is for you to continue crafting exceptional applications that bring fresh functionality to the Invision Community while protecting the integrity of our core functionality.
    Change can be intimidating, but let us embrace this opportunity to bid farewell to outdated and fragile tools and pave the way for a collaborative future with precision-designed resources instead.
    In the coming weeks, we will delve deeply into the new development tools offered by Invision Community 5, but today, I wanted to give you a brief overview of what's to come for code development. We will do a near-future entry on creating themes with Invision Community 5.
    Out with the old
    Monkey patching via code hooks was the primary way to add functionality to Invision Community. However, it meant that we could not update our code base without risking breaking many popular applications, a situation that will only get worse as PHP starts to lock down type hinting and casting.
    Furthermore, IDEs have a tough time working out relationships between classes requiring special tools to create alias files to allow full use of many advanced tools of PHPStorm and other editors. Finally, monkey patching relied on heavy use of eval() which is not a very efficient PHP method.
    Monkey patching has been removed in Invision Community 5.
    Your IDE with Invision Community 4.

    Your IDE with Invision Community 5.

     
    Template hooks, as you know them, have also been removed. I only mention this now as they often go hand-in-hand with code hooks to add items to menus, data-attributes to blocks and CSS classes to many areas. We will do a more thorough blog on theme editing soon, but we still retain a way to hook into key areas.
    In with the new
    We will write a series of developer blogs to look in more detail at the new systems, but here is a quick overview of the new tools and a brief description of what they are capable of.
    Content Menus
    We have removed much of the menu logic for content items and comments from templates and created a simple, extensible way to add links to commonly used menus, such as the item moderation menu and the per-post 'three dots' menu. You no longer need a template hook to perform such a basic task.

    UIExtension
    This framework provides you with an easy way to add CSS, data-attributes and even templated HTML into specific areas within nodes and content items/comments. A common reason to create template hooks was to tweak the CSS classes or add data-attributes for client-side scripting.

    In the same way that we've stripped menus out of templates, we've removed the content item badges (pinned, hidden, etc.) and into the UIExtension making it easy to add your own badges to this area without the need for template or code hooks.
    Finally, UIExtension can add form fields into Invision Community content forms.
    Event Listeners
    The easiest way to describe this is like MemberSync but for content (items and comments), members, Commerce invoices and Commerce packages.
    Do you need to run your code each time a forum post is made? Not a problem. Do you need to run your code when a topic is locked? Perhaps when an item is viewed? All this and more is possible via the new listeners.
    The advantage is that you don't need to copy chunks of our code when overloading a single method in a hook. You write your clean code in an object-specific listener.

    What else?
    We have also undertaken a long overdue code clean-up. Every single file has been updated to update return types and function signature types and to use aliases instead of fully qualified names (for example, new Url() instead of new \IPS\Http\Url()).
    Many methods have been removed from the Content classes and moved into traits. Likewise, many interfaces are now traits to reuse code properly, reducing the behemoth-sized classes.
    Elsewhere, all the search indexing logic that was entwined in content and node classes has now been moved to the extension system, further reducing the noise and volume of key classes.
    A Quick Recap
    Generic broad reaching tools such as monkey patching and template overloading have been removed. New precision tools with a specific use-case have been created. There are less opportunities to overwrite and change our UI and functionality but easier ways to extend and create new functionality. The future
    We have worked hard on these development tools to ensure that most of what you do now can be achieved in Invision Community 5. We have had input from various stakeholders, including those who regularly create modifications for Invision Community to ensure our new tools are fit for purpose.
    Through the alpha and beta testing phase, we want your feedback, and we will listen to your suggestions. We cannot promise that you can do everything with Invision Community 5 that you currently do, which is intentional, but we are confident that you can still hit all the major beats. We want to protect our UI and functionality a little more but encourage you to build amazing new functionality to work alongside Invision Community 5.
    Together, we will shape the next era of Invision Community.
  2. Like
    nodle reacted to Matt for an entry, Development update for May 2022   
    Welcome to our May developer's update!
    May has been a bit of a whirlwind as we worked through the cloud platform feature set along, the backlog of existing issues reported to us and a new feature coming to all platforms.
    Along with the usual bug fixes in the backlog, we also worked on a few popular requests, such as adding hCaptcha as a new CAPTCHA option. We've seen this battle spam bots much more effectively than the existing methods, so if you're being hit by a lot of spam, consider upgrading to 4.7.0 and enabling hCaptcha.
    Jordan announced the new alerts feature here. It's a new way to reach out to members (or entire groups) and ensure they read and act on the alert. Many configuration options make it a very flexible feature useful for one-off alerts to a single member. It can also be used as a welcome message as part of your onboarding process.
    Invision Community 4.7.0 (also known as the June release) will have tentative support for PHP 8.1. While we have tested the core apps extensively, you should check with any third party developers to ensure their apps are PHP 8 ready. We intend to move to PHP 8.0 as the minimum version later this year (and our dev team is excited about this, they can't wait to use mixed return types, which is as exciting as it gets for us most days).
    Here is the full change log for the June release.
    Core - Added alerts functionality. - Added hCaptcha support. - Added a setting to exclude groups from search logs. - Added support for PHP 8.1. - Increased minimum PHP version to 7.4 and recommended version to 8.0. - Added a solved/unsolved filter for activity streams. - Changed Marketplace search to 'AND' mode for more accurate results. - Changed 'member download' to output comma-separated values instead of tab-separated values to be consistent with member import. - Changed the poll behaviour to allow everybody to view the poll result of closed polls. - Improved the email editor to show the full email name while editing it. - Updated CKEditor to 4.19.0. - Moved the stream subscription links to an own menu item. - Fixed an issue that may prevent attaching audio files to content. - Fixed a minor typo in the forms.css template. - Fixed upload area not showing on minimized editors for guest users. - Fixed an issue where post counts were incremented even when a new item was held for approval via the profanity filters. - Fixed an issue where filters and sort options do not persist between deleting members in the Admin CP. - Fixed an issue where sitemap may show entries from offline applications. - Fixed an issue where support account may show as the latest registered member. - Fixed an issue where the upgrade process would fail to finish because of duplicate DB queries. - Fixed an issue where the default streams had a broken time period. - Fixed an issue where widgets may not be available even with enabled apps. - Fixed an issue where status updates where appearing as search results even if the user had no permissions to view profiles. - Fixed some issues with the online status indicator in account settings. - Fixed an issue with deleting bulletins when deleted remotely. - Fixed an issue where clicking on the reorder-menu link in clubs can add multiple reorder icons. - Fixed an issue where managing Widgets via the AdminCP > Applications > Dev Center meant that Yes/No toggles could fail to work. - Fixed an issue where the block submission filter failed to catch loose matches when in the middle of a word and/or using non latin characters. - Fixed an incorrect link on a modal popup when trying to follow a member when the member hasn't configured their preferences. - Fixed an issue fetching Clubs via the REST API when they have custom fields. - Fixed an issue when viewing a list of awarded badges if one was earned by a rule in a deleted application. - Fixed a missing `</ul>` in the poll template. - Fixed an issue where the 'approved content' notification (and any newly added notifications) might not have valid default options until edited via AdminCP. - Fixed missing padding on the AdminCP file locations modal. - Fixed some UX issues when revoking an OAuth access token. - Fixed an issue where non-image attachments inserted via the editor may not download. - Fixed a missing language string in member history when spam defense system applies moderation to a new member. - Fixed an issue with 'solved' push notifications linking to a non-existent page. - Fixed an issue with the Zapier Extension when PHP was running in CGI mode. - Fixed an issue where rank progress would still show in profiles when no ranks exist. - Fixed an issue using the ban filters in member group promotion rules. - The Editor Preview Button was removed from ACP Editors. - Removed the deprecated FX Country code from the Geolocation class. - Removed the ability to rebuild existing attachment thumbnails due to an incompatibility with content attributes required for lazy-loading. - Removed the SQL Toolbox. Forums - Improved the fluid-mode per forum filters to remove a page reload, and to reverse the filter checkbox status to make it clear which are being viewed. - Fixed an issue where checking an archived topic for new replies when you ignore other members may always show a 'new' post has been created. - Fixed an issue where top posters in the topic statistics section may show in the wrong order. Gallery - Fixed an issue with the followed Gallery Images page. - Fixed an issue with rebuilding thumbnails on legacy communities where the original image may no longer exist. Pages - Added the missing `__indefart_cms_page` language string. - Added copy buttons on the modal that displays the HTML to copy to embed blocks elsewhere. - Improved search indexing speed of comments when Elastic Search is used. - Fixed an issue where sorting by a numerical field could duplicate the option with an incorrect label. - Fixed issue with 'image upload' block carousels not working in the sidebar - Fixed an issue where custom Yes/No fields when used as a database filter were ignored when further sorting. - Fixed an issue where categories could have broken breadcrumbs. - Fixed an issue where entering a blank value for a required decimal field would save the value as 0. - Fixed an issue where using a Yes/No field as a database filter may cause the custom sort form display to not allow toggling of the Yes/No field. - Fixed an issue that allowed duplicate template group names in some circumstances. - Fixed an issue where who's online widget blocks would throw an error while creating or editing them in the ACP. Converters - Fixed an issue rebuilding some profile photo images. - Fixed an issue where vBulletin `[video]` tags would not be parsed if the video ID contained a hyphen. Commerce - Added ability to require an active subscription to use community. - Added support for Stripe - Apple Pay Domain Verification Files on Cloud. - Improved Subscriptions including up/downgrading to other subscriptions and offering limited free subscriptions. - Improved performance when updating a large number of existing purchases. - Removed deprecated Amex Express checkout options. - Fixed some issues that can occur when requiring a subscription or product to be purchased during registration. - Fixed an issue where a card would not be auto-billed if the customer did not have an address. - Fixed a niche issue where a renewal invoice (for manual payment) would not be generated if a PayPal Subscription was cancelled on an active purchase. - Fixed an issue where account credit would not be used for an invoice if the credit remaining was the exact value of the invoice. - Fixed an issue calculating the next renewal date when upgrading between Subscriptions that may use a different renewal period (i.e. monthly vs annually). Calendar - Fixed an issue where the day view wouldn't show todays events when it's being used as the default calendar view. Downloads - Fixed an issue where change logs may show the wrong published date if the file description had been edited since the last update. - Fixed an issue where creating a downloads category with the "Keep previous versions?" Setting being disabled would result in a DB error. Platform - Added real time and historic trending data in sidebar blocks and leaderboard. REST, Webhooks and Zapier - Fixed an issue where the 'hidden' content item filter would be ignored for any content type except topics. - Fixed an issue where the date parameter for the 'Edit a topic' endpoint was not updating topic/post post date. Key points for developers are as follows:
    Added PHP 8.1 support; however, we have silenced deprecation errors for core applications and system directory as we work through those in the following releases. Updated Whoops to 2.14.5 Fixed an issue where managing MFA in the Account Settings would result in an IN_DEV CSRF key warning. Fixed an issue where you could not pass variables to the {hextorgb} theme plugin. Fixed an issue where creating or editing a forum with IN_DEV being enabled would return an error. Fixed an issue with ips.ui.infiniteScroll.js when using FURLs. Fixed a syntax error in the core unsubscribeStream.txt email template. Member filters will only be processed/visible for group promotions if they have a matches() method. That's it for now; see you on the forums!
×
×
  • Create New...