Latest Updates

Documenting code, one commit at a time.

JSON PHP 10 posts
×
PHP Laravel CSS

Fixing Filament Panel Rendering with Inline Styles

The Reimpact platform utilizes Filament for its admin panels. A recent update addressed an issue where the impersonation banner wasn't rendering correctly across all panels.

The Problem

The bg-warning-500 class in Filament relies on CSS custom properties. These properties weren't consistently available during the BODY_START render hook, leading to inconsistent banner styling.

Read more

Explicit Type Casting in PostgreSQL Functions: A Must-Do

Ever faced a baffling error message that seemed to defy logic? In the Reimpact platform, we encountered a particularly frustrating issue in our PostgreSQL dashboard functions. The symptom? A cryptic 42883 error cropping up across all Packaging dashboard widgets.

The culprit turned out to be PostgreSQL's strictness regarding implicit type casting. Specifically, it doesn't automatically convert

Read more

Mitigating Session Logout Issues After User Impersonation

Introduction

Have you ever experienced a user being unexpectedly logged out immediately after being impersonated? This issue often stems from inconsistencies in session data following authentication switches. Let's explore how to address this in a PHP-based platform.

The Problem: Stale Session Password Hashes

In many web applications, especially those employing middleware for

Read more

Global Impersonation: Fixing a Routing Glitch in a Laravel Platform

Working on the Reimpact platform, we encountered a routing issue that prevented the 'stop impersonation' feature from working consistently across all panels. This post details the problem and the solution implemented to ensure global functionality.

The Problem

The impersonation.stop route was not always accessible because the RouteServiceProvider responsible for registering it wasn't

Read more

Enhancing Data Visualization in Filament with PostgreSQL Functions

Introduction

This post explores how the Reimpact/platform project enhanced its Filament-based dashboard by leveraging PostgreSQL functions to improve data visualization. The focus was on creating a more insightful and efficient packaging dashboard.

From MySQL to PostgreSQL: A Performance Shift

The initial implementation relied on MySQL stored procedures. To optimize performance and

Read more
PHP Livewire

Maintaining Session Integrity During Impersonation in Livewire

Introduction

When implementing user impersonation functionality, a common pitfall is inadvertently breaking the user's session. This post addresses an issue in a Reimpact platform where session loss occurred during impersonation due to Livewire's single-page application (SPA) navigation.

The Problem: Session Regeneration and SPA Navigation

The Auth::login() function in PHP regenerates

Read more

Refactoring Module Selectors for Enhanced UX in Laravel Filament

When working with Laravel Filament on the Reimpact platform, small UI refinements can have a significant impact on user experience. Recently, we addressed an issue concerning the module selector's icon sizing and positioning, particularly its integration with the platform's logo.

The Problem

The original implementation relied on Tailwind CSS classes for styling the module selector icon.

Read more
PHP Reimpact

Fixing Impersonation Redirects in Reimpact Platform

In the Reimpact platform, a recent issue arose during user impersonation, specifically in the administrative interface. The problem manifested as a 500 error when accessing the ewcommand{\administration}{\texttt{/administration/users}} route. This was traced back to the use of redirect() within the impersonation action.

The core issue was that redirect() returned void and then called

Read more
PHP JUnit

Improving User Experience with Redirects and Automated Testing in Platform

Introduction

This post discusses enhancements made to the platform, focusing on improving the user experience through redirect fixes and ensuring stability with automated testing. The changes streamline user actions and provide confidence in the platform's reliability.

Redirect Chain Optimization

A key improvement involves fixing the redirect chain within the UserResource.

Read more