How do modern browsers optimize reflows when handling complex CSS Grid layouts with dynamic JavaScript content?

I’m experimenting with a responsive dashboard layout using CSS Grid and dynamic components injected via JavaScript (e.g. charts, lists, panels). I noticed that sometimes the reflow is sluggish or inconsistent on scroll-heavy views.

How exactly do modern browsers (like Chrome or Firefox) schedule reflows when DOM nodes with display: grid change dimensions frequently?

Is there a threshold or batching technique browsers use before triggering layout recalculations?

Would will-change or contain: layout actually help in these cases?

Should I debounce resize or DOM injection operations for better performance?

Would love insights from anyone who’s worked on dashboard UIs or knows how browsers render large grid layouts efficiently.

Some issue with using MariaDB in Node.js

async function StoreData(id, name, age, city) {
    let Conn;
    try {
        Conn = await Pool.getConnection();
        let Query = await Conn.query(`insert into users
                                      values (?, ?), [id, name, age, city]);
        ]`);
        console.log(Query);
    } catch (error) {
        console.log(error);
    } finally {
        if (Conn) {
            Conn.end();
        }
    }
}

// POST method
App.post("/api/data", (req, res) => {
    let RequestData = req.body;
    console.log("Received data:", RequestData);

    res.status(200).json({message: "Data received successfully."});

    StoreData(RequestData.id, RequestData.name, RequestData.age, RequestData.city)
        .then((response) => {
            return response.json();
        })
        .then((data) => {
            console.log(data);
        })
        .catch((error) => {
            console.log(error);
        });
});

I wanna store some test data in MariaDB using JavaScript, Node.js and Express.js.
A button is on an HTML page and when it’s clicked, it’s gonna store these data fetched from a simple JavaScript file.
An ID, a Name, an Age and a City.
I think the syntax is kinda fine but ESLint is showing me error on the arguments of the function “StoreData()”.
It says: “id, name, age and city are defined but not used”.
But I put them in the template string of a query for storing the data in MariaDB.
Can somebody please help me figure this out?
Whether I’m writing the code wrongly or something is missing.

Thingsboard html widget

I used html widget to display an image with boxes inside it. I want to create an action to navigate to another state when I press the boxes. I created the action settings, but it did not work. I used navigate to new dashboard state action and custom action and both did not work.

Custon action code:

var $injector = widgetContext.$scope.$injector;
$injector.get(widgetContext.servicesMap.get('entityService')).getEntity(entityId.entityType, entityId.id)
    .subscribe(function(data) {
        console.log(JSON.stringify(data))
        console.log(entityName);
        if (data.name.includes("Warehouse 1")) {


            openDashboardStates('device_details', data);
        }


    });

function openDashboardStates(statedId, m) {
    var stateParams = widgetContext.stateController.getStateParams();
    var EID = m.id.id;
    var ENAME = m.name;


    var parID = {
        id: EID,
        entityType: "ENTITY_VIEW"
    };
    var preparam = {
        entityId: parID,
        entityName: ENAME,
        entityLabel: ENAME

    };
    var newparam = {
        selectedFreezer: preparam,
        targetEntityParamName: "selectedFreezer"
    };



    widgetContext.stateController.openState(statedId, newparam, false);
}

I am getting net::ERR_TOO_MANY_REDIRECTS in PHP code

I am getting net::ERR_TOO_MANY_REDIRECTS

When I search treatments according to the department dropdown getting error and jquery is not working,jquery is not loading and the dependent dropdown is not working

<script>
       $(document).ready(function() {
        // When the department dropdown is changed
        alert('Hi');
        $('#department').on('change', function() {
            var departmentId = $(this).val();
            var departmentName = $(this).find('option:selected').text();

            if (departmentId) {
                $.ajax({
                    url: 'get_treatments.php',
                    type: 'POST',
                    data: {
                        department_id: departmentId,
                        department_name: departmentName
                    },
                    success: function(response) {
                        $('#treatment').html(response);
                        updateDepartmentName(departmentId, departmentName);
                    }
                });
            } else {
                $('#treatment').html('<option value="">Select Department first</option>');
            }
        });

alert not working

Laravel serving private user images via custom route — image URL returns 200 but image not displayed

I have a laravel project serving domain.com and there is a subdomain for user profile as profile.domain.com,

Now on edit profile blade, I need to show the uploaded avatar image of user which is uploaded and stored at root project storage directory:

/home/myuser/domain.com/storage/app/private/public/users/{userId}/{filename}

I made a route like this:

Route::get('/private-file/{type}/{userId}/{filename}', function ($type, $userId, $filename) {
    $allowedTypes = ['users', 'members'];
    if (!in_array($type, $allowedTypes)) {
        abort(404);
    }

    $mainStoragePath = '/home/pachim/ino-official.org/storage/app/private/public';

    $path = $mainStoragePath . "/{$type}/{$userId}/{$filename}";

    if (!file_exists($path)) {
        abort(404);
    }

    $mimeType = mime_content_type($path);

    return response()->file($path, ['Content-Type' => $mimeType]);
})->name('private.file');

And it is working and show the user avatar image like this:

https://profile.domain.com/private-file/users/115/Hq6VhEg1YSJQG82ALfabShAQPWTSPWUCf58vtLYu.png

But in the blade, the image not showing up, despite the correct source which is accessible by now:

<div class="col-md-6 mb-4">
    <label for="avatar" class="form-label fw-bold">Profile Picture</label>
        <div class="d-flex align-items-center">
            <div class="me-3">
                @php
                // Default placeholders if no images
                $defaultAvatar = asset('/assets/img/profile.png');
                $defaultPassport = asset('assets/img/passport-placeholder.jpg');

                // Build URLs using your new route if avatar/passport_photo exist
                $avatarUrl = $user->avatar
                    ? url('user-image/' . $user->avatar)
                    : $defaultAvatar;

                $photoUrl = $detail?->passport_photo
                    ? url('user-image/' . $detail->passport_photo)
                    : $defaultPassport;
                @endphp

                <img id="avatarPreview" src="{{ $avatarUrl }}" alt="User Avatar" class="rounded-circle border" style="width: 100px; height: 100px; object-fit: cover;">
            </div>
            <div class="flex-grow-1">
                <input type="file" name="avatar" class="form-control @error('avatar') is-invalid @enderror" id="avatar" accept="image/*" onchange="previewAvatar(this)">
                @error('avatar')
                    <div class="invalid-feedback">{{ $message }}</div>
                @enderror
                <small class="text-muted">Accepted: JPG, PNG. Max size: 2MB</small>
            </div>
        </div>

How i can integrate Zoom call API in Laravel for users

i want to integrate Zoom call API so users can talk with each other but i don’t want to create host my self so if user created the call the user should be the host

`public function createMeeting($data)
{
$accessToken = $this->getAccessToken();

    try {
        $response = $this->client->request('POST', 'users/me/meetings', [
            'headers' => [
                'Authorization' => 'Bearer ' . $accessToken,
                'Content-Type' => 'application/json',
            ],
            'json' => array_merge($data, [
                    'agenda' => "xxx Zoom Meeting",
                    "duration"=> 60,
                    "approval_type"=> 2,
                    "contact_name" =>"jhon",
                      'settings' => [
                'join_before_host' => true, // Allow participants to join before the host
                'waiting_room' => false, // Disable waiting room if you want participants to join directly
            ],


            ]),
        ]);

        return json_decode($response->getBody(), true);
    } catch (RequestException $e) {
        return json_decode($e->getResponse()->getBody()->getContents(), true);
    }
}`

if you are familier with fiverr calls i need same

laravel react + filament, admin page running too slow [closed]

When i inspect it and head to the network page it goes like this
here

CreateCommitee.php

<?php

namespace AppFilamentResourcesCommiteeResourcePages;

use AppFilamentResourcesCommiteeResource;
use FilamentActions;
use FilamentResourcesPagesCreateRecord;

class CreateCommitee extends CreateRecord
{
    protected static string $resource = CommiteeResource::class;
}

EditCommitee.php

    <?php

namespace AppFilamentResourcesCommiteeResourcePages;

use AppFilamentResourcesCommiteeResource;
use FilamentActions;
use FilamentResourcesPagesEditRecord;

class EditCommitee extends EditRecord
{
    protected static string $resource = CommiteeResource::class;

    protected function getHeaderActions(): array
    {
        return [
            ActionsDeleteAction::make(),
        ];
    }
}

ListCommitee.php

<?php

namespace AppFilamentResourcesCommiteeResourcePages;

use AppFilamentResourcesCommiteeResource;
use FilamentActions;
use FilamentResourcesPagesListRecords;

class ListCommitees extends ListRecords
{
    protected static string $resource = CommiteeResource::class;

    protected function getHeaderActions(): array
    {
        return [
            ActionsCreateAction::make(),
        ];
    }
}

this is all the code in my app/Filament/Resources/CommiteeResources/Pages did i do something wrong here??

CommiteeResource.php

<?php

namespace AppFilamentResources;

use AppFilamentResourcesCommiteeResourcePages;
use AppFilamentResourcesCommiteeResourceRelationManagers;
use AppModelsCommitee;
use FilamentForms;
use FilamentFormsForm;
use FilamentResourcesResource;
use FilamentTables;
use FilamentTablesTable;
use IlluminateDatabaseEloquentBuilder;
use IlluminateDatabaseEloquentSoftDeletingScope;

class CommiteeResource extends Resource
{
    protected static ?string $model = Commitee::class;

    protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';

    public static function form(Form $form): Form
    {
        return $form
            ->schema([
                FormsComponentsTextInput::make('nama')
                    ->required()
                    ->maxLength(255),
                FormsComponentsTextInput::make('nim')
                    ->required()
                    ->maxLength(255),
                FormsComponentsTextInput::make('jurusan')
                    ->required()
                    ->maxLength(255),
                FormsComponentsTextInput::make('angkatan')
                    ->required()
                    ->numeric(),
                FormsComponentsTextInput::make('kode_referral')
                    ->maxLength(255)
                    ->default(null),
            ]);
    }

    public static function table(Table $table): Table
    {
        return $table
            ->columns([
                TablesColumnsTextColumn::make('nama')
                    ->searchable(),
                TablesColumnsTextColumn::make('nim')
                    ->searchable(),
                TablesColumnsTextColumn::make('jurusan')
                    ->searchable(),
                TablesColumnsTextColumn::make('angkatan')
                    ->numeric()
                    ->sortable(),
                TablesColumnsTextColumn::make('kode_referral')
                    ->searchable(),
                TablesColumnsTextColumn::make('created_at')
                    ->dateTime()
                    ->sortable()
                    ->toggleable(isToggledHiddenByDefault: true),
                TablesColumnsTextColumn::make('updated_at')
                    ->dateTime()
                    ->sortable()
                    ->toggleable(isToggledHiddenByDefault: true),
            ])
            ->filters([
                //
            ])
            ->actions([
                TablesActionsEditAction::make(),
            ])
            ->bulkActions([
                TablesActionsBulkActionGroup::make([
                    TablesActionsDeleteBulkAction::make(),
                ]),
            ])
            
            ->headerActions([
                // Tambahkan baris ini dan biarkan kosong untuk menghilangkan tombol "New commitee"
                // Atau, jika Anda ingin menambahkan tindakan lain di header, tambahkan di sini.
                // Contoh: TablesActionsAction::make('Custom Action')->action(fn () => dd('Custom action clicked')),
            ]);
    }

    public static function getRelations(): array
    {
        return [
            //
        ];
    }

    public static function getPages(): array
    {
        return [
            'index' => PagesListCommitees::route('/'),
            'edit' => PagesEditCommitee::route('/{record}/edit'),
        ];
    }
}

Commitee.php (Models)

<?php

namespace AppModels;

use IlluminateDatabaseEloquentFactoriesHasFactory;
use IlluminateDatabaseEloquentModel;

class Commitee extends Model
{
    use HasFactory;

    protected $table = 'commitee'; 
    protected $fillable = [
        'nama',
        'nim',
        'jurusan',
        'angkatan',
        'kode_referral',
    ];

}

migration

<?php

use IlluminateDatabaseMigrationsMigration;
use IlluminateDatabaseSchemaBlueprint;
use IlluminateSupportFacadesSchema;

return new class extends Migration
{
     /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('commitee', function (Blueprint $table) {
            $table->id();
            $table->string('nama');
            $table->string('nim')->unique(); 
            $table->string('jurusan'); 
            $table->string('angkatan'); 
            $table->string('kode_referral')->nullable(); 
            $table->timestamps(); // Kolom created_at dan updated_at
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('commitee');
    }
};

How i solve the problem, i already using php artisan icons:cache but it didn’t work

How can I translate JetEngine Dynamic Field values (from a custom query) into Persian inside a Listing in Elementor?

I’m working on a WordPress website using JetEngine and Elementor.

I have created a custom query in JetEngine (via Query Builder) that fetches data directly from the database — specifically, WooCommerce order records.

This custom query is then used as the source of a Listing in Elementor, which displays each record using JetEngine’s Dynamic Field widget.


Here’s the problem:

One of the fields in the query is status, and its values are in English (e.g.):

  • wc-completed
  • wc-pending
  • wc-cancelled

When I use the Dynamic Field widget inside the Listing, these English values are shown directly on the page.


What I want:

I want to translate these field values into Persian for display in the frontend, like:

  • wc-completedتکمیل شده
  • wc-pendingدر انتظار
  • wc-cancelledلغو شده

Limitations:

  • I can only use JetEngine’s Dynamic Field widget inside the Listing.
  • I cannot use HTML widgets, shortcodes, or custom templates.
  • I prefer a solution with minimal or no PHP code, using built-in JetEngine features like:
    • Output filters
    • Macros
    • Callbacks
    • Conditional logic (if available)

My question:

How can I map or translate the field values returned from a custom query in JetEngine, and display them as Persian text inside a Listing, using only the Dynamic Field widget in Elementor?

If there’s no code-free solution, what is the simplest PHP-based workaround (e.g., via a callback function or filter) to transform these values before they are rendered in the Dynamic Field?

Thanks in advance!

How to force mobile view using iframe?

I’ve been trying to embed a place view from Google Maps into my app, not just a static embed, but the full mobile-style place panel UI (the one with photo, tabs, reviews, buttons, etc. like you see on the Google Maps mobile site).

Tried this:

And set my browser or iframe to mobile dimensions (like iPhone 12 Pro) to trigger the mobile layout. Weird thing is — sometimes it actually works in dev tools, especially if I spoof the user agent.

BUT:

On real browsers it often refuses to load

X-Frame-Options: SAMEORIGIN blocks it completely in most cases

Seems like Google is actively preventing this?

I know the Embed API exists, but it’s too limited (no tabs, reviews, or ticket prices). I’m building a more immersive experience and really want that native-looking mobile UI for places.

So is there a better workaround for this problem?

Why does inject() return the value of a ref from a reactive object instead of a reactive reference?

I’m working with Vue 3’s Composition API, and I’m trying to provide a ref that is part of a reactive object. However, when I inject it in a child component, I get the raw value, not the reactive ref.

Here’s a simplified version of what I’m doing:

Parent component:

const position = ref("right");

const imageSetup = reactive({
  position
});

provide('position', imageSetup.position);

Child component:

const position = inject('position');

When I access position in the child, it’s just a plain string (“right”) instead of a ref. I lose reactivity.
If I provide(position) directly without wrapping it in a reactive object, the child receives a reactive ref and everything works fine. But I want to avoid declaring each state separately and instead use a single reactive object.
I’d like to be able to structure my shared state as a single reactive object and still be able to inject individual refs from it without losing reactivity.

Is there a way to keep the reactive structure and preserve the reactivity of injected refs?

onclick only fires once [closed]

I encountered a problem before this everything worked fine but when I corrected errors in the code and added select group my button stopped being processed, to be more precise it works once after which I need to reopen the window with the button (not reload but call the window using the same onclick event)

modalBody.innerHTML = `
<h3>Редактирование условия</h3>
<label class="modal-label">Заголовок:
  <input type="text" id="nodeTitleInput" value="${node.data.title || ''}" class="modal-input"/>
</label>
<div id="conditions-container" class="conditions-container"></div>
<div class="condition-form">
  <select id="conditionField" class="modal-select">
        ${availableFields.map(f => {
    return `
            <option id="conditionValue" value="${f.title}">${f.title}</option>
    <optgroup label="${f.label}" id="conditionValue">
        <option class="subtitle" id="conditionValue">${f.value}</option>
    </optgroup>
    <hr />`
}).join('')};


 modalBody.querySelector('#addConditionBtn').onclick = () => {
    const field = conditionFieldSelect.value;
    const type = conditionTypeSelect.value;
    const valInput = modalBody.querySelector('#conditionValue');
    const value = valInput ? valInput.value.trim() : null;

    if (!field || (type !== 'not_null' && !value)) return;

    if (!node.data.conditions) node.data.conditions = [];

    const condition = { field, type };
    if (type !== 'not_null') condition.value = value;
    if (['equals', 'not_equals', 'greater_than', 'less_than', 'greater_or_equal', 'less_or_equal'].includes(type)) {
        condition.operator = {
            equals: '==',
            not_equals: '!=',
            greater_than: '>',
            less_than: '<',
            greater_or_equal: '>=',
            less_or_equal: '<='
        }[type];
    }

    node.data.conditions.push(condition);
    renderConditions();
    updateNodeHtml(node, id);

    if (valInput) valInput.value = '';
};

visual
I tried different options, tried to solve the problem through addEventListener, but with it, data is not sent at all, can you please help, I am a newbie in js, so I can’t immediately identify the problem

Firebase signInWithPhoneNumber is not sending otp to the number

We have ionic angular app and firebase signInWithPhoneNumber was working good before.
but now suddenly its stopped working. always giving internal server error.
Seince we are on Blaze plan and billing is enabled. and domain is also added in the domain list.
we have searched also but no success.
also we have enabled phone auth.
also added the country to allow list.

please let us know about the issue.

we are getting below error

{“error”:{“code”:500,”message”:”Internal error encountered.”,”errors”:[{“message”:”Internal error encountered.”,”domain”:”global”,”reason”:”backendError”}],”status”:”INTERNAL”}}

makeCaptcha() {
    const component = this;
    this.recaptchaVerifier = new firebase.auth.RecaptchaVerifier('recaptcha-container', {
      'size': 'invisible',
      'callback': (response) => {
        console.log(response);
        component.captchanotvarified = true;
      }
    });
    this.recaptchaVerifier.render();
  }

  sendOtpBrowser(phone) {
    const component = this;
    this.uiElementService.presentLoading('Sending otp');
    this.makeCaptcha();
    firebase.auth().signInWithPhoneNumber(phone, this.recaptchaVerifier)
      .then((confirmationResult) => {
        console.log('otp_send_success', confirmationResult);
        component.result = confirmationResult;
        component.uiElementService.dismissLoading();
        component.uiElementService.presentToast('OTP Sent');
        if (component.isDemoNumber === 'true') {
          component.otp = component.config.demoLoginCredentials.otp;
          component.verify();
        }
        component.otpNotSent = false;
        if (component.intervalCalled) {
          clearInterval(component.timer);
        }
        component.createInterval();
      })
      .catch((error) => {
        console.log('otp_send_fail', error);
        component.resendCode = true;
        component.uiElementService.dismissLoading();
        component.uiElementService.presentToast(error.message || 'OTP Sending failed');
      });
  }