Skip to content

Conversation

@ftonato
Copy link
Contributor

@ftonato ftonato commented Oct 12, 2021

Description

In order to fix the problem related on the issue #295 I've created the code to fix it.

Fixes #295

Type of Change:

  • Code

How Has This Been Tested?

You can run the new branch and check if all navigation items are with "capital letters".

Checklist:

Delete irrelevant options.

  • My PR follows the style guidelines of this project
  • I have performed a self-review of my own code or materials

Copy link
Member

@isabelcosta isabelcosta left a comment

Choose a reason for hiding this comment

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

Thank you so much @ftonato for proposing and working on this!

@isabelcosta isabelcosta requested a review from vj-codes October 13, 2021 23:24
@isabelcosta isabelcosta added the Status: Needs Review PR needs an additional review or a maintainer's review. label Oct 13, 2021
@isabelcosta
Copy link
Member

cc @brittanyjoiner15 could you maybe look at this one too :)

Copy link
Contributor

@brittanyjoiner15 brittanyjoiner15 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 to me! Left a small comment about alphabetization, but feel free to ignore as it's not essential :) Well done, this was nice @ftonato !

@isabelcosta
Copy link
Member

@brittanyjoiner15 could you please approve it again :) Approve is one of the review options. After that I can merge :)

@isabelcosta isabelcosta added hacktoberfest-accepted Status: Needs Review PR needs an additional review or a maintainer's review. and removed Status: Needs Review PR needs an additional review or a maintainer's review. labels Oct 17, 2021
@isabelcosta
Copy link
Member

@brittanyjoiner15 do you know what could be wrong with prettier run here? I don't think it is related to this PR 🤔 But I am not sure
cc @Aaishpra @codesankalp in case you have some useful knowledge here on github actions in web projects

@ftonato do you have an idea of what could be happening here? I updated this PR in hopes it would be mergable right away, but this check is failing. Could we do something here 🤔

@brittanyjoiner15
Copy link
Contributor

@ftonato @isabelcosta hmm, I wonder if it's because it's confused because we have the .prettierrc.json file merged in but this branch doesn't have it yet? Maybe @ftonato try pulling changes fromdevelop and seeing if it works after that's all merged up together?

@ftonato
Copy link
Contributor Author

ftonato commented Oct 17, 2021

Hello, after a few minutes of trying and trying I found the problem, or at least managed to fix it on my branch.

I'll open a pull-request to submit the solution and remove the commits I made on the current branch to test...

btw, we should have a telegram channel to talk about a few things (all three)!

/c @isabelcosta @brittanyjoiner15

@ftonato ftonato force-pushed the refactor/update-navibar-capital-letters branch from 30b934e to 78f46c4 Compare October 17, 2021 16:08
@ftonato
Copy link
Contributor Author

ftonato commented Oct 17, 2021

I just deleted all commits, I'm going to redo them (dumb)!

Edit: Done! We can merge this and as I said above I will send another PR to fix the "prettier problem" 😛

@isabelcosta
Copy link
Member

btw, we should have a telegram channel to talk about a few things (all three)

We can talk on Zulip :) That is where the community talks about the projects so that everyone can join discussions. We have a stream for this project.

@isabelcosta
Copy link
Member

@ftonato can you update the PR, just so we see the checks passing, please?

@ftonato ftonato force-pushed the refactor/update-navibar-capital-letters branch 2 times, most recently from 9a9e8fe to 7d7faa6 Compare October 19, 2021 08:28
@isabelcosta
Copy link
Member

@ftonato do you have any idea why the checks for prettier are failing 🤔 i wonder why 😳

@brittanyjoiner15
Copy link
Contributor

@isabelcosta so we probably need to update the docs to let people know they'll want to install prettier locally, and they might need to run the npx --write (can't remember the exact command, but something like that). It seems like all of them are failing now that we've implemented prettier aren't they? Or have we had any successful ones aside from the ones from my device?

@ftonato
Copy link
Contributor Author

ftonato commented Oct 19, 2021

I don't understand why it's failing only on the pull-request and not on my branch (fork), I'll need to invest a little more time on this tomorrow to calmly evaluate...

I will do this as soon as possible!

@isabelcosta
Copy link
Member

@isabelcosta so we probably need to update the docs to let people know they'll want to install prettier locally, and they might need to run the npx --write (can't remember the exact command, but something like that). It seems like all of them are failing now that we've implemented prettier aren't they? Or have we had any successful ones aside from the ones from my device?

If that is something we can put on README, let's do it! Could you create an issue to add that instruction to the README?

@isabelcosta
Copy link
Member

I don't understand why it's failing only on the pull-request and not on my branch (fork), I'll need to invest a little more time on this tomorrow to calmly evaluate...

I will do this as soon as possible!

I see it falling on your fork as well https://github.com/ftonato/anitab-org.github.io/runs/3919521463 🤔 but take your time! As long as we have updates from time to time.

@brittanyjoiner15
Copy link
Contributor

@isabelcosta yes! i can do that, @ftonato i might want you to be my "beta" tester and confirm if that seems to fix the issue or not before i do that. Basically following these instructions

@ftonato
Copy link
Contributor Author

ftonato commented Oct 20, 2021

I made some changes thinking it might have been something and it worked on my branch, but here it kept failing so I pushed it back to the original state (thus failing on my branch too).

However, I will try to validate all this today =)

@ftonato ftonato force-pushed the refactor/update-navibar-capital-letters branch from 7d7faa6 to 217b463 Compare October 20, 2021 08:09
@ftonato
Copy link
Contributor Author

ftonato commented Oct 20, 2021

@isabelcosta can you take a look on this? It seems that our bot (prettier action) don't have the right permissions to perform the commit:

image

@isabelcosta
Copy link
Member

Not sure why, but it seems the src/content/home.js needs prettier updates 🤔 Could you try running prettier on your branch, including src/content/home.js and see if it changes anything? (i know you did not change that file at all, but if it helps, I don't mind getting that into this PR) @ftonato

From what I understand, this is failing because it is trying to commit changes for a file that has changes proposed by prettier.

I wonder if this action should be changed, to not try to commit but simply fail if prettier suggests changes and pass if prettier does not suggest changes.

@isabelcosta isabelcosta added Status: Needs Testing Work has been reviewed and needs the code tested by the quality assurance team. and removed Status: Needs Review PR needs an additional review or a maintainer's review. labels Oct 22, 2021
@isabelcosta
Copy link
Member

@ftonato I see it failing again. I will ignore this for now and test the PR and if all good merge this.
Will create a follow-up issue to fix the action 😅 I see it's failing in multiple PRs :(

uses: creyD/[email protected]
with:
prettier_options: "--write src/**/*.{ts,jsx,js,css,html,json,md}"
prettier_options: --write src/**/*.{ts,jsx,js,css,html,json,md}
Copy link
Member

Choose a reason for hiding this comment

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

I just noticed, is there any reason why this was reverted and why package-lock.json and yarn.lock have so many changes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I realized that the quotes are not necessary (and not suggested in the plugin's official documentation) so I removed it!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The package-lock has a lot of changes because I tried to rebase it with develop (it still fails)

Copy link
Member

Choose a reason for hiding this comment

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

Could you revert those file changes (yarn.lock and package-lock.json)? And keep this PR to the changes related to the ticket?

@ftonato
Copy link
Contributor Author

ftonato commented Oct 22, 2021

@isabelcosta I really don't know why it only fails in PR for this repository, I do it in my FORK it works perfectly, and I really think it might have some relationship with permissions (https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#permissions).

My suggestion is to stop using github action to make the prettier and do it with husky, does it sound okay or not? (If approved, I can create the PR with it, but someone from the organization will have to remove the action)

@isabelcosta
Copy link
Member

@isabelcosta I really don't know why it only fails in PR for this repository, I do it in my FORK it works perfectly, and I really think it might have some relationship with permissions (https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#permissions).

My suggestion is to stop using github action to make the prettier and do it with husky, does it sound okay or not? (If approved, I can create the PR with it, but someone from the organization will have to remove the action)

I understand, we can remove/fix it on another ticket. That is fine!
Once I have a little more time I'll look into permissions and GH action.

@ftonato
Copy link
Contributor Author

ftonato commented Oct 22, 2021

I will create another PR to include all this changes! (#325)

@isabelcosta Can we merge this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hacktoberfest-accepted Status: Needs Testing Work has been reviewed and needs the code tested by the quality assurance team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Refactor] Update our navigation bar converting all capital letters to normal text

4 participants