The AppGini Blog
A few tips and tricks to make your coding life a tiny bit better.

New features in AppGini 25.11: An in-depth look

AppGini 25.11 is here, and it comes with a host of new features and improvements that will enhance your experience and productivity. In this post, we’ll take a closer look at some of the most exciting new features in this release.

Users can now personalize their app theme from the profile page

Previously, users had to rely on the default theme set in the project file. Now, they can choose from a selection of themes (16 in total) directly from their profile page. This feature allows users to customize the look and feel of their app to suit their preferences, making it more user-friendly and visually appealing.

Programmatic control over the theme selection

This feature is enabled by default, but you can disable it if you prefer to keep the default theme for all users. To do this, open the hooks/__bootstrap.php file in your project folder (or create it if it doesn’t exist) and add the following line:

1
define('NO_THEME_SELECTION', true);

This will prevent users from changing the theme from their profile page, and they will only see the default theme set in the project file.

Programmatically set the default theme

You can also set the default theme for all users programmatically, without having to change it in the project file and regenerate the app. To do this, add the following line to the hooks/__bootstrap.php file:

1
define('DEFAULT_THEME', 'theme-name');

Replace theme-name with the name of the theme you want to set as the default. For a list of available themes, refer to the New theme constants section below.

Users will still be able to change the theme from their profile page unless you have disabled the theme selection feature via the NO_THEME_SELECTION constant as mentioned above.

You can also set the default font size for all users programmatically by adding the following line to the hooks/__bootstrap.php file:

1
define('THEME_COMPACT', true); // true for compact font size, false for normal

This will set the default font size for all users, but they can still change it from their profile page if the theme selection feature is enabled.

Mobile users can now install AppGini apps to their devices

AppGini apps can now be installed as mobile apps (PWA) from browsers that support this feature (Chrome for Android, Safari for iOS). This means that users can access their AppGini apps directly from their device’s home screen, just like any other app. This feature is especially useful for users who need to access their apps on the go, as it provides a more convenient and user-friendly experience.

How to disable PWA support

PWA support is enabled by default in AppGini 25.11. It works on all browsers that support PWA features, including Chrome for Android and Safari for iOS. In case you want to disable PWA support, you can do so by unchecking the option Allow users to install app on mobile (PWA) under the Security and technical settings section in the project pane in AppGini:

Disable PWA support

This will disable PWA support for all users, and they will not be able to install the app on their devices.

Customizing the mobile app behavior

This is an AppGini Pro feature – not available in the free version.

You can change the default icon of the mobile app, as well as the app name, description, and other settings. To do this, define the hook function pwa_manifest() in the hooks/__bootstrap.php or hooks/__global.php file. This function receives the manifest array as a parameter, and should return the modified manifest array. For example, to change the app icon, name, and description, you can use the following code:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
function pwa_manifest($manifest) {
  $manifest['name'] = 'Acme App';
  $manifest['short_name'] = 'Acme';
  $manifest['description'] = 'Manage your Acme business with ease.';
  $manifest['icons'] = [
    [
      'src' => 'https://example.com/icon-192x192.png',
      'sizes' => '192x192',
      'type' => 'image/png'
    ],
    [
      'src' => 'https://example.com/icon-512x512.png',
      'sizes' => '512x512',
      'type' => 'image/png'
    ]
  ];
  return $manifest;
}

For more information about the PWA manifest file, refer to the Web App Manifest documentation.

Improved mobile layout and usability

AppGini 25.11 introduces several improvements to the mobile layout and usability of the app. These include enhancements to top navigation menu, action buttons, and the overall user experience on mobile devices. The changes are designed to boost usability and make it easier to navigate and interact with the app on smaller screens.

Enhanced filters page UI and usability

The filters page has been redesigned to improve usability, reduce clutter, and make it easier to navigate. The new design includes a more intuitive layout, clearer labels, and improved organization of filter options, without compromising functionality.

Server-side programmatic changes

cleanUpMembershipUserRecords() function

This new function allows you to remove all orphan records from the membership_userecords table. This is useful when you are using hooks to delete records. Previously, you had to manually delete their corresponding ownership records from the membership_userecords table. Now, you can simply call this function to clean up any orphan records.

New theme constants

You can set these constants in the hooks/__bootstrap.php file to control the theme selection and default theme for all users programmatically:

  • THEME_COMPACT: This constant allows you to set the default font size for all users programmatically. Set it to true for compact font size or false for normal font size.

  • DEFAULT_THEME: This constant allows you to set the default theme for all users programmatically. Set it to the name of the theme you want to use as the default. Available themes are:

    • bootstrap
    • cerulean
    • cosmo
    • cyborg
    • darkly
    • flatly
    • journal
    • paper
    • readable
    • sandstone
    • simplex
    • slate
    • spacelab
    • superhero
    • united
    • yeti
  • NO_THEME_SELECTION: This constant allows you to disable the theme selection feature for all users. Set it to true to disable the feature or false to enable it. By default, this feature is enabled.

Client-side programmatic changes

  • Added AppGini.config.appTitle to retrieve the application title via client-side JS.
    • Refactored common.js to use AppGini.config.appTitle instead of hard-coded app title.
  • Added AppGini.handleLightbox() function to replace Lightbox library with a bootstrap carousel in a modal window. Initializes the lightbox functionality for elements with data-lightbox attributes. If you have custom code using Lightbox, make sure it has a data-lightbox attribute in order for it to continue working.
  • Updated the source code documentation for modal_window() to JSDoc style (works better with VSCode).
  • Apply AppGini.config.timeFieldMinutesStep to time picker popup in addition to input group buttons.

BREAKING CHANGES

  • Removed prototype.js, Scriptaculous and Lightbox JS components to reduce page load time and improve client-side performance.
    • If you have custom code that relies on these libraries, you will need to update it to remove the dependency on these libraries.
  • Added AppGini.noDVPanel() to prepend xs- to all panel classes in DV in mobile view.
    • If you have custom code depending on panel classes in DV, you need to adjust selectors accordingly.