-
Notifications
You must be signed in to change notification settings - Fork 9
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
P#56183 Optimize columns on list views for forms estates and addresses #139
P#56183 Optimize columns on list views for forms estates and addresses #139
Conversation
…orms-estates-and-addresses
Pull Request Test Coverage Report for Build 1964212787
💛 - Coveralls |
tests/TestClassDatabaseChanges.php
Outdated
@@ -213,7 +214,7 @@ public function testUninstall(array $createQueries) | |||
// assert that as many tables have been removed as have been created | |||
$uniqueCreateQueries = array_unique($createQueries); | |||
$uniqueDropQueries = array_unique($this->_dropQueries); | |||
$this->assertEquals(count($uniqueCreateQueries), count($uniqueDropQueries)); | |||
$this->assertGreaterThanOrEqual(count($uniqueCreateQueries), count($uniqueDropQueries)); |
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.
How can more tables be dropped than created?
} | ||
if (strpos($view->page_shortcode,(string)$postID)!== false) | ||
{ | ||
$pageID = chop($view->page_shortcode,$postID); |
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.
This looks unstable. Better use explode
, array functions. and implode
.
@@ -144,7 +174,9 @@ public function prepare_items() | |||
$columns = [ | |||
'cb' => '<input type="checkbox" />', | |||
'name' => __('Name of View', 'onoffice-for-wp-websites'), | |||
'template' => __('Tempaltes', 'onoffice-for-wp-websites'), |
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.
Typo in "Templates".
plugin/Gui/Table/EstateListTable.php
Outdated
@@ -119,6 +124,31 @@ private function fillData() | |||
]); | |||
} | |||
|
|||
private function handleRecord($listRecord) |
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.
This block was duplicated so often. Can it be factored out into something reusable?
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.
This is still open
plugin/Gui/Table/EstateListTable.php
Outdated
$page = ''; | ||
foreach ($listPageID as $pageID) | ||
{ | ||
if (!empty($page)) |
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.
Better use implode
.
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.
this is still open, too
plugin/Gui/Table/EstateListTable.php
Outdated
{ | ||
$page .= ','; | ||
} | ||
$page .= "<a href='".get_edit_post_link((int)$pageID)."' target='_blank'>".get_the_title((int)$pageID)."</a>"; |
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.
esc_attr()
missing around get_edit_post_link()
and esc_html()
missing around get_the_title
.
plugin/Gui/Table/EstateListTable.php
Outdated
{ | ||
return []; | ||
} | ||
foreach ($listRecord as &$record) |
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.
An array of new records would be cleaner than &
.
@@ -274,6 +281,7 @@ private function getCreateQueryForms() | |||
`radius` INT( 10 ) NULL DEFAULT NULL, | |||
`geo_order` VARCHAR( 255 ) NOT NULL DEFAULT 'street,zip,city,country,radius', | |||
`show_estate_context` tinyint(1) NOT NULL DEFAULT '0', | |||
`page_shortcode` tinytext NOT NULL, |
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.
isn't this duplicate information? This is the name with some constant string left and right. Totally reproducible.
plugin/Gui/Table/EstateListTable.php
Outdated
@@ -119,6 +124,31 @@ private function fillData() | |||
]); | |||
} | |||
|
|||
private function handleRecord($listRecord) |
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.
This is still open
plugin/Gui/Table/EstateListTable.php
Outdated
$page = ''; | ||
foreach ($listPageID as $pageID) | ||
{ | ||
if (!empty($page)) |
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.
this is still open, too
c0347a8
to
500acc0
Compare
…orms-estates-and-addresses
…orms-estates-and-addresses
@hungnc89 test feedback "Test with version 2.21.4-13-gd93dcbf6 installed on https://wpptest.onofficeweb.com/. See also the attached video. Errors.mp41.) After installing the project code all previously created lists, forms etc. are gone. When switching back to another code, they are there again. |
@michaelarnold-dev , i tested in localhost oki, i recorded in video like link : https://files.fm/f/87gz62b92, can you check and upgrade db_version ? |
@tang-hien-egs Robert said that 3) is still open. He asks you to consider these values /fields 1.1) Add the following columns to the estate list overview:
1.2) For the forms:
1.3) For addresses:
|
@michaelarnold-dev , i fixed it, can you check it ? |
@michaelarnold-dev , i tested local and record video like link : https://files.fm/f/yqk2a5zwr |
@tang-hien-egs could you please clean up the code from your last commit? |
@jayay i fixed it and fixed conflict, can you check PR help me ? |
P#56183 Optimize columns on list views for forms estates and addresses