Urgent.News

What's breaking now, across thousands of outlets.

Tech

I spent one day smashing three real open source bugs

This is a submission for DEV's Summer Bug Smash: Clear the Lineup powered by Sentry . When the Summer Bug Smash challenge started, I gave myself one rule. Every fix has to be real, and every fix has to carry its own test that fails before the change and passes after it. I gave myself one day to see how far that rule could take me. It took me through three open source projects, three pull…

Bug two: a slider that forgot which way to read

The second project I tackled was Rocket.Chat's design system, Fuselage. Within the Slider component, there were two related bugs plaguing the track fill. First, the colored fill between the thumb and the track's starting point utilized left-to-right math exclusively. Consequently, in right-to-left languages, such as Arabic or Hebrew, the fill appeared on the incorrect side of the thumb.

Second, if a slider possessed a minValue amount, the fill would not accurately reflect that minimum value, causing confusion for users. To rectify these issues, I first adjusted the mathematical calculations for the track fill, ensuring that the colored section would correctly account for the language direction. Additionally, I implemented checks to verify that the minValue was being considered accurately within the slider's range.

After implementing these changes, I added comprehensive tests to verify that the slider functioned correctly in both left-to-right and right-to-left language contexts, ensuring that the fill remained properly aligned with the thumb and that the minimum value was respected.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

More from Sunday 23 August →