-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Right to left mode #611
Right to left mode #611
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
return new class () extends Migration { | ||
/** | ||
* Run the migrations. | ||
*/ | ||
public function up(): void | ||
{ | ||
Schema::table('forms', function (Blueprint $table) { | ||
$table->boolean('layout_rtl')->default(false); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
*/ | ||
public function down(): void | ||
{ | ||
Schema::table('forms', function (Blueprint $table) { | ||
$table->dropColumn('layout_rtl'); | ||
}); | ||
} | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,12 +20,13 @@ | |
v-if="form.logo_picture" | ||
class="w-full p-5 relative mx-auto" | ||
:class="{'pt-20':!form.cover_picture, 'md:w-3/5 lg:w-1/2 md:max-w-2xl': form.width === 'centered', 'max-w-7xl': (form.width === 'full' && !isIframe) }" | ||
:style="{ 'direction': form?.layout_rtl ? 'rtl' : 'ltr' }" | ||
> | ||
<img | ||
alt="Logo Picture" | ||
:src="form.logo_picture" | ||
:class="{'top-5':!form.cover_picture, '-top-10':form.cover_picture}" | ||
class="w-20 h-20 object-contain absolute left-5 transition-all" | ||
class="w-20 h-20 object-contain absolute transition-all" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Logo positioning change needs to be reverted The search results show that the logo positioning was previously handled with dynamic classes based on the cover picture presence: :class="{'top-5':!form.cover_picture, '-top-10':form.cover_picture}" This conditional positioning has been removed in favor of a static positioning, which will break the layout in different scenarios. The logo needs different vertical positions (
🔗 Analysis chainVerify logo positioning in all scenarios. The class binding has been simplified, but please verify that the logo positioning still works correctly in these scenarios:
🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Search for related logo positioning styles and tests
echo "Searching for related logo positioning styles..."
rg -t vue "logo.*position|position.*logo" --glob "client/**/*.vue"
echo "Searching for related logo tests..."
rg -t js -t vue "logo.*test|test.*logo" --glob "client/**/*.{spec,test}.{js,ts,vue}"
Length of output: 399 Script: #!/bin/bash
# Let's try a different approach to search for logo-related styles and layout
echo "Searching for logo-related styles in Vue files..."
rg "class=.*logo|class=.*w-20.*h-20" --type-add 'vue:*.vue' -t vue
echo -e "\nSearching for cover picture related code..."
rg "coverPicture|cover-picture" --type-add 'vue:*.vue' -t vue
echo -e "\nChecking RTL-related styles..."
rg "rtl|direction.*rtl|dir=.*rtl" --type-add 'vue:*.vue' -t vue
echo -e "\nLooking for the form component structure..."
rg -A 5 -B 5 "w-20.*h-20" --type-add 'vue:*.vue' -t vue
Length of output: 2656 |
||
> | ||
</div> | ||
</div> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Add boolean casting for the layout_rtl property.
For better data integrity and consistent type handling, consider adding the layout_rtl property to the casts array.
Add this to the casts array in the casts() method: