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

cleanup and minor changes #101

Merged
merged 4 commits into from
Sep 21, 2023
Merged

cleanup and minor changes #101

merged 4 commits into from
Sep 21, 2023

Conversation

sherikovic
Copy link
Contributor

@sherikovic sherikovic commented Sep 21, 2023

Issue Addressed

I did a couple of cleanups and minor changes, also added Arabic translation with a position manipulation of the ... that follows "Before I Die"

Proposed Changes and Benefits

  • App.js l.21: there is margin and padding added on l.19 already —> can be removed (not changed)
  • App.js l.18: onCategoryChange={handleCategoryChange} doesn’t seem to have any functionality, also there is no categories in the contributors JSON

Notes to Reviewers

Checklist

  • MasonryLayout.jsx: removed “my” from classes’ names
  • Moved the call to useIPInfo() to MasonryLayout rather than MasonryBox so that it wouldn’t get called with every rendered box and passed the ipInfo through to the box
  • Added Arabic translation and changed the direction of … that goes after “Before I die” to go from right to left in MasonryBox.jsx
  • Replaced “my-masnry” with “masonry-card” in MasonryBox.jsx and MasonryBox.module.css

@vercel
Copy link

vercel bot commented Sep 21, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
before-i-die-achievements ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 21, 2023 3:01pm

src/App.js Outdated
@@ -14,7 +14,7 @@ const App = () => {
};

return (
<>
<React.Fragment>
<Header onCategoryChange={handleCategoryChange} />
Copy link
Member

Choose a reason for hiding this comment

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

I see why you asked about categories in the contributor's JSON. Good catch, as this callback function was from the template of the starter open-source project used to get this project off the ground and the JSON was organized differently then. In this case, we would not need this callback function since there is no category and changes taking place. And I agree with your proposed change.

@@ -14,7 +14,7 @@ const App = () => {
};

return (
<>
<React.Fragment>
<Header onCategoryChange={handleCategoryChange} />
<div className="flex justify-content-center" style={{ marginTop: "50px", padding: '50px' }}>
Copy link
Member

Choose a reason for hiding this comment

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

Nice good catch again, as I have just looked and ran on my local dev server, and it functions normally with <div className="flex justify-content-center" > with your other proposed change on App.js l.21: there is margin and padding added on l.19 already —> can be removed (not changed)

Copy link
Member

Choose a reason for hiding this comment

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

Wow! Thank you for taking the time to fix the naming of the classes, as this is a better naming convention now.

Copy link
Member

Choose a reason for hiding this comment

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

Brilliant! I didn't even consider the ... for the languages that go from right to left. That is a great detail you have highlighted and added. @sherikovic. It took me a little bit to realize why you were moving the ... until I realized the language is written in the other language😅

I ran a search, and other languages that are right to left are:

  • Aramaic
  • Azeri
  • Dhivehi/Maldivian
  • Hebrew
  • Kurdish (Sorani)
  • Persian/Farsi
  • Urdu
  • Syriac
  • Rohingya
  • Fula
  • N'ko

We will have to make the updates for the IP change language translations we added in issue #76 to include if anymore languages we have added thus far need to have ... placed to the left of the text.

It is a great idea to move the useIPnfo() from the MasonryBox so that it doesn't have to be called every time upon clicking on a contributor.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Brilliant! I didn't even consider the ... for the languages that go from right to left. That is a great detail you have highlighted and added. @sherikovic. It took me a little bit to realize why you were moving the ... until I realized the language is written in the other language😅

I ran a search, and other languages that are right to left are:

  • Aramaic
  • Azeri
  • Dhivehi/Maldivian
  • Hebrew
  • Kurdish (Sorani)
  • Persian/Farsi
  • Urdu
  • Syriac
  • Rohingya
  • Fula
  • N'ko

We will have to make the updates for the IP change language translations we added in issue #76 to include if anymore languages we have added thus far need to have ... placed to the left of the text.

It is a great idea to move the useIPnfo() from the MasonryBox so that it doesn't have to be called every time upon clicking on a contributor.

Yea makes sense. I was thinking about that too, but wanted to try it out for Arabic first.

Copy link
Member

@XanderRubio XanderRubio left a comment

Choose a reason for hiding this comment

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

@sherikovic I went ahead and went through your 11 file changes, and they look great! Thank you for taking the time to assist and make it more organized, code refracturing a bit, the addition on Arabic with customizing the text to display ... to the left, and additionally making the IP component run more efficiently so it doesn't have to render every time when clicking on a contributor image to see their text.

You can go ahead and make your two proposed charges 🟢

  • App.js l.21: there is margin and padding added on l.19 already —> can be removed (not changed)
  • App.js l.18: onCategoryChange={handleCategoryChange} doesn’t seem to have any functionality, also there is no categories in the contributors JSON

And once you recommit and the preview link runs successfully again, we will merge this into the main!

@sherikovic
Copy link
Contributor Author

@sherikovic I went ahead and went through your 11 file changes, and they look great! Thank you for taking the time to assist and make it more organized, code refracturing a bit, the addition on Arabic with customizing the text to display ... to the left, and additionally making the IP component run more efficiently so it doesn't have to render every time when clicking on a contributor image to see their text.

You can go ahead and make your two proposed charges 🟢

  • App.js l.21: there is margin and padding added on l.19 already —> can be removed (not changed)
  • App.js l.18: onCategoryChange={handleCategoryChange} doesn’t seem to have any functionality, also there is no categories in the contributors JSON

And once you recommit and the preview link runs successfully again, we will merge this into the main!

Done!

@XanderRubio XanderRubio merged commit 17804d4 into BeforeIDieCode:main Sep 21, 2023
1 check passed
@XanderRubio
Copy link
Member

Great work, @sherikovic, for your detailed contributions to cleaning up the code and adding code logic to display before I die in another language, taking into account if that language is written in the other direction. This pull request additionally contributes to one task in issue #76 and makes progress by adding to it the language translation in Arabic for Before I Die. Successfully mergedClapping Hands, and please double check how it looks on the live link.

sherikovic added a commit to sherikovic/BeforeIDieAchievements that referenced this pull request Sep 22, 2023
@sherikovic sherikovic mentioned this pull request Sep 22, 2023
@XanderRubio XanderRubio mentioned this pull request Sep 30, 2023
Merged
4 tasks
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.

None yet

2 participants