Skip to content

Commit

Permalink
Merge pull request #1561 from suraj-webkul/datagrid-shimmer
Browse files Browse the repository at this point in the history
fix datagrid shimmer effects
  • Loading branch information
jitendra-webkul authored Aug 30, 2024
2 parents db4e5db + ade6142 commit da5d6e0
Show file tree
Hide file tree
Showing 19 changed files with 57 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@
</div>

<!-- DataGrid Shimmer -->
@if (request()->get('view-type') == 'table')
@if (
request()->get('view-type') == 'table'
|| ! request()->has('view-type')
)
<x-admin::shimmer.datagrid />
@endif
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ class="primary-button"

{!! view_render_event('admin.organizations.datagrid.index.before') !!}

<x-admin::datagrid src="{{ route('admin.contacts.organizations.index') }}" />
<x-admin::datagrid :src="route('admin.contacts.organizations.index')" >
<!-- DataGrid Shimmer -->
<x-admin::shimmer.datagrid />
</x-admin::datagrid>

{!! view_render_event('admin.organizations.datagrid.index.after') !!}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,9 @@ class="primary-button"
</div>
</div>

{!! view_render_event('admin.person.datagrid.index.before') !!}

<x-admin::datagrid src="{{ route('admin.contacts.persons.index') }}" />

{!! view_render_event('admin.person.datagrid.index.after') !!}
<x-admin::datagrid :src="route('admin.contacts.persons.index')">
<!-- DataGrid Shimmer -->
<x-admin::shimmer.datagrid />
</x-admin::datagrid>
</div>
</x-admin::layouts>
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{!! view_render_event('admin.leads.index.table.before') !!}

<x-admin::datagrid src="{{ route('admin.leads.index') }}">
<x-admin::datagrid :src="route('admin.leads.index')">
<!-- DataGrid Shimmer -->
<x-admin::shimmer.datagrid />

<x-slot:toolbar-right-after>
@include('admin::leads.index.view-switcher')
</x-slot>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class="primary-button"
<!-- DataGrid -->
<x-admin::datagrid
ref="datagrid"
src="{{ route('admin.mail.index', request('route')) }}"
:src="route('admin.mail.index', request('route'))"
>
<template #header="{
isLoading,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,9 @@ class="primary-button"
</div>
</div>

{!! view_render_event('admin.products.index.datagrid.before') !!}

<!-- DataGrid -->
<x-admin::datagrid src="{{ route('admin.products.index') }}" />

{!! view_render_event('admin.products.index.datagrid.after') !!}
<x-admin::datagrid :src="route('admin.products.index')">
<!-- DataGrid Shimmer -->
<x-admin::shimmer.datagrid />
</x-admin::datagrid>
</div>
</x-admin::layouts>
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class="primary-button"
{!! view_render_event('admin.quotes.index.datagrid.before') !!}
<!-- DataGrid -->
<x-admin::datagrid src="{{ route('admin.quotes.index') }}" />
<x-admin::datagrid :src="route('admin.quotes.index')" />
{!! view_render_event('admin.quotes.index.datagrid.after') !!}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ class="primary-button"
{!! view_render_event('admin.settings.attributes.index.datagrid.before') !!}

<!-- DataGrid -->
<x-admin::datagrid :src="route('admin.settings.attributes.index')" />
<x-admin::datagrid :src="route('admin.settings.attributes.index')">
<!-- DataGrid Shimmer -->
<x-admin::shimmer.datagrid />
</x-admin::datagrid>

{!! view_render_event('admin.settings.attributes.index.datagrid.after') !!}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ class="primary-button"
{!! view_render_event('admin.settings.email_template.index.datagrid.before') !!}

<!-- DataGrid -->
<x-admin::datagrid :src="route('admin.settings.email_templates.index')"/>
<x-admin::datagrid :src="route('admin.settings.email_templates.index')">
<!-- DataGrid Shimmer -->
<x-admin::shimmer.datagrid />
</x-admin::datagrid>

{!! view_render_event('admin.settings.email_template.index.datagrid.after') !!}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ class="primary-button"
{!! view_render_event('admin.settings.pipelines.index.datagrid.before') !!}

<!-- DataGrid -->
<x-admin::datagrid :src="route('admin.settings.pipelines.index')" />
<x-admin::datagrid :src="route('admin.settings.pipelines.index')">
<!-- DataGrid Shimmer -->
<x-admin::shimmer.datagrid />
</x-admin::datagrid>

{!! view_render_event('admin.settings.pipelines.index.datagrid.after') !!}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,9 @@ class="primary-button"
</div>
</div>

{!! view_render_event('admin.settings.roles.index.datagrid.before') !!}

<!-- DataGrid -->
<x-admin::datagrid :src="route('admin.settings.roles.index')" />

{!! view_render_event('admin.settings.roles.index.datagrid.after') !!}
<x-admin::datagrid :src="route('admin.settings.roles.index')">
<!-- DataGrid Shimmer -->
<x-admin::shimmer.datagrid />
</x-admin::datagrid>
</div>
</x-admin::layouts>
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class="primary-button"
<!-- Datagrid -->
<x-admin::datagrid
src="{{ route('admin.settings.sources.index') }}"
:src="route('admin.settings.sources.index')"
ref="datagrid"
>
<template #body="{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class="primary-button"
<!-- Datagrid -->
<x-admin::datagrid
src="{{ route('admin.settings.tags.index') }}"
:src="route('admin.settings.tags.index')"
ref="datagrid"
>
<template #body="{
Expand Down Expand Up @@ -99,7 +99,7 @@ class="icon-checkbox-outline peer-checked:icon-checkbox-select cursor-pointer ro
<p>@{{ record.id }}</p>
<!-- Name and Color -->
<p class="flex gap-2 items-center">
<p class="flex items-center gap-2">
<span
class="block h-6 w-6 cursor-pointer rounded-full shadow-md transition duration-200 ease-in-out peer-checked:border-4 peer-checked:border-solid peer-checked:border-white"
:style="`background-color: ${record.color}`"
Expand Down Expand Up @@ -203,7 +203,7 @@ class="peer absolute left-0 right-3 top-5 z-10 h-full w-full cursor-pointer opac
<label
:for="index"
class="block h-6 w-6 cursor-pointer rounded-full shadow-md transition duration-200 ease-in-out peer-checked:border-4 peer-checked:border-solid peer-checked:border-gray-850"
class="peer-checked:border-gray-850 block h-6 w-6 cursor-pointer rounded-full shadow-md transition duration-200 ease-in-out peer-checked:border-4 peer-checked:border-solid"
:style="`background-color: ${color.background}`"
>
</label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class="primary-button"
<!-- Datagrid -->
<x-admin::datagrid
src="{{ route('admin.settings.types.index') }}"
:src="route('admin.settings.types.index')"
ref="datagrid"
>
<template #body="{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class="primary-button"
<!-- Datagrid -->
<x-admin::datagrid
src="{{ route('admin.settings.users.index') }}"
:src="route('admin.settings.users.index')"
ref="datagrid"
>
<template #body="{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ class="primary-button"
{!! view_render_event('admin.settings.warehouses.index.datagrid.before') !!}

<!-- DataGrid -->
<x-admin::datagrid src="{{ route('admin.settings.warehouses.index') }}" />
<x-admin::datagrid :src="route('admin.settings.warehouses.index')">
<!-- DataGrid Shimmer -->
<x-admin::shimmer.datagrid />
</x-admin::datagrid>

{!! view_render_event('admin.settings.warehouses.index.datagrid.after') !!}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class="primary-button"
{!! view_render_event('admin.settings.web_forms.index.datagrid.before') !!}
<!-- DataGrid -->
<x-admin::datagrid src="{{ route('admin.settings.web_forms.index') }}" />
<x-admin::datagrid :src="route('admin.settings.web_forms.index')" />
{!! view_render_event('admin.settings.web_forms.index.datagrid.after') !!}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ class="primary-button"

{!! view_render_event('admin.settings.webhooks.index.datagrid.before') !!}

<x-admin::datagrid :src="route('admin.settings.webhooks.index')" />
<x-admin::datagrid :src="route('admin.settings.webhooks.index')">
<!-- DataGrid Shimmer -->
<x-admin::shimmer.datagrid />
</x-admin::datagrid>

{!! view_render_event('admin.settings.webhooks.index.datagrid.after') !!}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ class="primary-button"

{!! view_render_event('admin.settings.workflows.index.datagrid.before') !!}

<x-admin::datagrid :src="route('admin.settings.workflows.index')" />
<x-admin::datagrid :src="route('admin.settings.workflows.index')">
<!-- DataGrid Shimmer -->
<x-admin::shimmer.datagrid />
</x-admin::datagrid>

{!! view_render_event('admin.settings.workflows.index.datagrid.after') !!}
</div>
Expand Down

0 comments on commit da5d6e0

Please sign in to comment.