-
Notifications
You must be signed in to change notification settings - Fork 36
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
fix hyphen issue for sync and controller code #1725
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yadvirkaur I can see there is difference in the logic in Mobile and Desktop. Is it something reconsidered now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously:
For the Bani Controller:
Mobile Devices: The code checked if the user had typed four characters without a hyphen and then inserted a hyphen after the third character.
Other Devices: The code added a hyphen automatically after the third character.
For Sangat Sync:
The code for all devices added a hyphen automatically after the third character.
Now:
I've now unified the logic for the Bani Controller to ensure consistent behaviour across all devices. The code now adds a hyphen automatically after the third character for all devices and ensures that no extra hyphens are added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yadvirkaur cool, thanks for the explainations, I totally got it. It's just I am unaware of these changes, if these are the changes requested lets do it. Also I would add, lets please make sure all these changes are mentioned in the ticket too, easier to review and followup.
Otherwise I would request to kindly confirm, as I am sure there might be good reason for this seperation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gurjit03 hnji veerji!
The mobile-specific logic for the Bani controller is fine as it is since it adds a hyphen after 4 characters only if the user hasn't already added one, so no risk of double hyphens there.
However, this can cause confusion between the Bani Controller and Sangat Sync since they handle hyphens differently for mobile devices.
@saintsoldierx @Gauravjeetsingh veerji please confirm if we need separation of logic or if we can have a unified logic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't remember the reason for separate logic, but if its working with the unified logic, let's keep that. Realistically it makes sense to have same logic for both mobile and desktop browsers.