cd4da342e58807c51ae0932501499f241698937c
Completely rebuilt the bar rendering logic for guaranteed visibility: 🔧 Improved Logarithmic Calculation: - Better handling of edge cases (zero, infinity) - Minimum 3% bar width for all visible values - Maximum 100% cap to prevent overflow - 6 orders of magnitude default range - Proper log scale normalization 🎨 Simplified Bar Styling: - Removed complex overlay positioning - Larger bars (h-6 for better visibility) - Solid background colors using CSS variables - Simple border for definition - White percentage text on colored bars - Text only shows when bar is >15% wide - Drop shadow for text readability ✨ Robust Value Handling: - Handles zero values (2% minimal bar) - Handles infinite/NaN values gracefully - Uses Math.abs for negative values - Proper min/max value detection - Filters out invalid values before calculation The bars will now ALWAYS be visible with proper widths, and the logarithmic scale ensures good visual distribution across different orders of magnitude. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Unit Converter
A spectacular, innovative unit conversion application built with modern web technologies to provide the best user experience for converting between various measurement units.
Tech Stack
- Next.js 16 - React framework with App Router and static export
- TypeScript - Type-safe development
- Tailwind CSS 4 - Modern utility-first CSS framework
- convert-units - Comprehensive unit conversion library
Features
Supported Units
23 measurement categories with 187 individual units:
- Angle, Apparent Power, Area, Current, Digital
- Each, Energy, Frequency, Illuminance, Length
- Mass, Pace, Parts Per, Power, Pressure
- Reactive Energy, Reactive Power, Speed, Temperature
- Time, Voltage, Volume, Volume Flow Rate
Innovative UX Features
- Real-time bidirectional conversion
- Smart context-aware interface with fuzzy search
- Visual comparison with color-coded categories
- Keyboard shortcuts for power users
- Mobile-first responsive design
- Conversion history with localStorage
- Dark mode support
Getting Started
Prerequisites
- Node.js 18+ or 20+
- pnpm (recommended) or npm
Installation
# Install dependencies
pnpm install
# Run development server
pnpm dev
# Build for production
pnpm build
# Start production server
pnpm start
Open http://localhost:3000 to see the app.
Project Structure
units-ui/
├── app/ # Next.js App Router
│ ├── layout.tsx # Root layout
│ ├── page.tsx # Home page
│ └── globals.css # Global styles
├── components/ # React components (coming soon)
├── lib/ # Utility functions (coming soon)
├── public/ # Static assets
└── IMPLEMENTATION_PLAN.md # Detailed implementation plan
Development
See IMPLEMENTATION_PLAN.md for the complete development roadmap.
License
MIT
Built with Next.js 16, Tailwind CSS 4, and convert-units
Description
Languages
TypeScript
90.3%
CSS
8.2%
Dockerfile
1.4%