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

Add git branch name to badge display #12

Merged
merged 5 commits into from
Nov 18, 2024

Conversation

hlipnick
Copy link
Contributor

@hlipnick hlipnick commented Feb 7, 2024

This pull request adds functionality to append the name of the currently checked out git branch to the end of the environment display badge, i.e.: Local (main).

Users can opt in by changing the ->showGitBranch() method to the plugin in the panel provider.

This PR serves to further enhance developer awareness when utilizing the Environment Indicator plugin.

@mischasigtermans
Copy link

Love this!

@pxlrbt pxlrbt merged commit e55bca2 into pxlrbt:main Nov 18, 2024
@pxlrbt
Copy link
Owner

pxlrbt commented Nov 18, 2024

Thanks @hlipnick. Finally had the time to clean this up and merge it.

@hlipnick
Copy link
Contributor Author

Thank you, @pxlrbt.


@isset($branch)
<code class="text-xs ml-1" style="margin-top: 1px">({{ $branch }})</code>

Choose a reason for hiding this comment

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

Why not use mt-px?

Copy link
Owner

Choose a reason for hiding this comment

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

Good point. As far as I see, it's not used in the default Filament CSS files and would require recompiling the stylesheets (using a theme).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants