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 color to tags #1631

Merged
merged 5 commits into from
Apr 14, 2020
Merged

Add color to tags #1631

merged 5 commits into from
Apr 14, 2020

Conversation

jojoemade
Copy link
Contributor

Description

A clear and concise description of what this pull request adds or changes.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I verified that my code applies to the guidelines (composer kimai:code-check)
  • [] I updated the documentation (see here)
  • I agree that this code is used in Kimai and will be published under the MIT license

Copy link
Member

@kevinpapst kevinpapst left a comment

Choose a reason for hiding this comment

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

Thanks for the PR @jojoemade !

Can you please execute composer kimai:codestyle-fix after applying the changes, that will fix the codestyle/linting issues.

The other test errors all come from the test database, which needs to updated with the migration.
But please don't do it yourself, I will test the changes and apply the migration later on.

src/Form/TagEditForm.php Outdated Show resolved Hide resolved
src/Migrations/Version20200413133226.php Outdated Show resolved Hide resolved
templates/macros/widgets.html.twig Outdated Show resolved Hide resolved
templates/macros/widgets.html.twig Outdated Show resolved Hide resolved
@kevinpapst kevinpapst linked an issue Apr 13, 2020 that may be closed by this pull request
@jojoemade jojoemade force-pushed the feature/jojoemade/786 branch from aa60f50 to 566d703 Compare April 14, 2020 08:59
@codecov
Copy link

codecov bot commented Apr 14, 2020

Codecov Report

Merging #1631 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##             master    #1631   +/-   ##
=========================================
  Coverage     92.17%   92.17%           
  Complexity     4774     4774           
=========================================
  Files           443      443           
  Lines         14785    14787    +2     
=========================================
+ Hits          13628    13630    +2     
  Misses         1157     1157           
Impacted Files Coverage Δ Complexity Δ
src/Entity/Tag.php 100.00% <ø> (ø) 11.00 <0.00> (ø)
src/Form/TagEditForm.php 100.00% <100.00%> (ø) 2.00 <0.00> (ø)
src/Repository/TagRepository.php 87.14% <100.00%> (+0.18%) 17.00 <0.00> (ø)

Comment on lines +36 to +38

$this->assertInstanceOf(Tag::class, $sut->setColor('#fffccc'));
$this->assertEquals('#fffccc', $sut->getColor());
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the addition!

Wouldn't it make more sense to test the trait just once instead of testing every place where it's used?

See https://phpunit.readthedocs.io/en/9.1/test-doubles.html#mocking-traits-and-abstract-classes

Copy link
Member

Choose a reason for hiding this comment

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

I am not really testing that the method works as expected, but I rather want to make sure that the methods exists on the object.

@kevinpapst kevinpapst added this to the 1.9 milestone Apr 14, 2020
@kevinpapst kevinpapst merged commit 0bc9e74 into kimai:master Apr 14, 2020
@kevinpapst
Copy link
Member

Thanks @jojoemade really appreciate your contribution 👍

@github-actions github-actions bot locked and limited conversation to collaborators Oct 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Colors for tags
2 participants