Skip to content
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

Enhance Widget Layout #4559

Merged

Conversation

Spraynard
Copy link
Contributor

This update contains two changes to two different files.

I had an issue similar to Issue #3185 and was able to implement a solution that works along with the current voyager configuration but allow for more than three widgets to be on the dashboard window.

This is what the dashboard window looks like with 1 - 3 Widgets

voyager_widgets_1

This is what the dashboard window looks like with 5 widgets

voyager_widgets_2

Please let me know if there is any more information needed

…ts on dashboard page.

dimmers.blade.php now runs through an array filled with widgetGroups

Voyager.php's 'dimmers()' function now returns an array filled wih WidgetGroups
Removing old, commented code that is not needed anymore.
Updating test and test documentation to fit with the current Dimmer paradigm

Adding in a new test to go over a new constraint through this update. That a dimmer group can only have a max three dimmers.
@Spraynard Spraynard changed the title Update Dimmer i.e. Widget layout and procedures Enhance Widget Layout Nov 19, 2019
Copy link
Collaborator

@MrCrayon MrCrayon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Except Test everything else looks good. 👍

tests/Unit/VoyagerTest.php Outdated Show resolved Hide resolved
Copy link
Collaborator

@MrCrayon MrCrayon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can remove the first test.

@@ -64,5 +83,7 @@ public function testEachDimmerGroupHasAMaxAmountOfThreeDimmers()
$dimmers = Voyager::dimmers();

$this->assertEquals(2, count($dimmers));
$this->assertEquals(3, $dimmers[0]->count());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This assertion proves what you were trying to prove in the previous test, so I think the other one can be removed.

Copy link
Collaborator

@MrCrayon MrCrayon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test can be removed.

tests/Unit/VoyagerTest.php Outdated Show resolved Hide resolved
Removing unnecessary test
Copy link
Collaborator

@MrCrayon MrCrayon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks for this PR

@Spraynard
Copy link
Contributor Author

Thank you very much for the help as well. It's much appreciated.

@emptynick emptynick merged commit 5b1935f into thedevdojo:1.3 Jan 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants