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

Make the translation search bar consistent with other search bar #2032

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

njmulsqb
Copy link

Assalam o Alaikum, this is my first PR with Quran.com; if this gets merged I will be happy to work on more issues.

Summary

fixes #872

Screenshots

Before After
144968269-afb4e2d2-0303-4a1d-b533-5efcf3784974 image

@vercel
Copy link

vercel bot commented Sep 22, 2023

@njmulsqb is attempting to deploy a commit to the Quran Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link

vercel bot commented Sep 23, 2023

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

Name Status Preview Comments Updated (UTC)
quran-com ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 25, 2023 8:34am

@njmulsqb
Copy link
Author

I have fixed some of the eslint errors that caused the build to fail on vercel; locally eslint is showing many other suggestions in structure of code i.e. removing extra spaces, should I apply them?

@njmulsqb
Copy link
Author

njmulsqb commented Oct 2, 2023

Assalam o Alaikum, can we merge this?

@@ -172,4 +174,5 @@ const TranslationSelectionBody = () => {
);
};

// eslint-disable-next-line max-lines
Copy link
Member

Choose a reason for hiding this comment

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

Instead of doing that, we should split the file into smaller components.

Copy link
Author

Choose a reason for hiding this comment

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

What additional component should I create and where? Just confirming if there's any specific pattern that you're following?

id="translations-search"
value={searchQuery}
onChange={setSearchQuery}
onChange={(event) => {
Copy link
Member

Choose a reason for hiding this comment

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

This should be a separate function e.g. const handleOnSearchQueryChange than an inline one.

@@ -25,6 +25,19 @@
margin-block-end: var(--spacing-small);
}

.searchInput {
Copy link
Member

@osamasayed osamasayed Oct 3, 2023

Choose a reason for hiding this comment

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

This is a duplicate of .searchInput css inside src/components/Navbar/SearchDrawer/Header/Header.module.scss. While this is not a major issue but I think a much better approach is to create a new component called SearchInput for example inside our dls directory that can be reused by both the search drawer and translations search and any other component in the future. This way, will be sure they are 100% consistent and easier to update in the future.

@osamasayed
Copy link
Member

Assalam o Alaikum, can we merge this?

Salamu Alikum brother, Jazak Allahu Kahiran for your contribution! I have left a couple of comments on your PR. Let me know if you need any further clarification

@deeseeker
Copy link

@njmulsqb Could you please look review your PR following those recommendations @osamasayed gave so we can fix this issue. You are already close to the finish line. Kindly finish the good work you started. May Allah reward you abundantly.

@njmulsqb
Copy link
Author

@deeseeker Would love to complete work on this, but I am getting following errors in the dev env, any idea how can they be resolved?
image
image
image

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.

inconsistent searchbox styling
3 participants