-
Notifications
You must be signed in to change notification settings - Fork 141
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
Implementation for Tab object #130
Comments
As requested in #129 I would also add a interface TabContract
{
// Through the Makeable trait
public static function make(string $title, array $fields, array $options = []): self;
public function name(string $name): self;
public function showIf(bool | callable $condition): self;
public function showUnless(bool | callable $condition): self;
public function titleAsHtml(bool $titleAsHtml = true): self;
public function icon(string $iconAsHtml): self;
public function tabClass(string $iconAsHtml): self;
public function bodyClass(string $iconAsHtml): self;
} |
@bernhardh Those requests have been added to the interface above. |
The new For those willing to try it out, you can use the feature/tabs-object branch. Mind you that at this time only the following fields are functional:
I will add the new properties to the Vue side soon. |
This is now available in master. |
Branch: https://github.com/eminiarts/nova-tabs/tree/feature/tabs-object
Implementation for the proposal in #129
To implement a
Tab
object I propose the following interface:Macroable
The
Tab
class would implement theIlluminate\Support\Traits\Macroable
trait to implement macros.However, if deeper adjustments are required, it would be better to extend the
Tab
class or make a custom implementation based on theTabContract
interface.Backwards compatibility
The current way to define tabs would remain a valid way to define them, but seeing that the
Tab
class would provide more flexibility, the array method could be considered obsolete or even deprecated.If chosen for deprecation, I vote to remove the feature in a 2.0 release.
Implementation plan
The plan to implement this feature would be as follows:
Additionally, as this feature would add quite a few new things to the frontend, this would be a good time to do some clean up these.
Finally, I'd like to start making use of GitHub Actions for some automation.
The text was updated successfully, but these errors were encountered: