|
| 1 | +# 2024-11-10 |
| 2 | + |
| 3 | +## Alert & Context API |
| 4 | + |
| 5 | +- 괜찮아보임 |
| 6 | + |
| 7 | +```jsx |
| 8 | +import { createContext, useContext, useState } from "react"; |
| 9 | + |
| 10 | +const AlertContext = createContext(undefined); |
| 11 | + |
| 12 | +export const AlertProvider = ({ children }) => { |
| 13 | + const [state, setState] = useState({ |
| 14 | + isOpen: false, |
| 15 | + type: "success", |
| 16 | + message: "", |
| 17 | + }); |
| 18 | + |
| 19 | + return ( |
| 20 | + <AlertContext.Provider |
| 21 | + value={{ |
| 22 | + ...state, |
| 23 | + onOpen: (type, message) => setState({ isOpe: true, type, message }), |
| 24 | + onClose: () => setState({ isOpen: false, type: "", message: "" }), |
| 25 | + }} |
| 26 | + > |
| 27 | + {children} |
| 28 | + </AlertContext.Provider> |
| 29 | + ); |
| 30 | +}; |
| 31 | + |
| 32 | +export const useAlertContext = () => useContext(AlertContext); |
| 33 | +``` |
| 34 | + |
| 35 | +## UI/UX |
| 36 | + |
| 37 | +### UX and UI Evaluation Methodologies: Cheat Sheet |
| 38 | + |
| 39 | +#### Dieter Ram's 10 Principles of Good Design |
| 40 | + |
| 41 | +1. Innovative: Design with new ideas and technology to bring innovative solutions. |
| 42 | +2. Useful: Prioritize functionality over aesthetics; designs must solve a problem. |
| 43 | +3. Aesthetic: A visually pleasing product can encourage use but should not compromise usability. |
| 44 | +4. Understandable: Clear and self-explanatory designs reduce the need for instructions. |
| 45 | +5. Unobtrusive: Avoid over-design; allow users to focus on their tasks effortlessly. |
| 46 | +6. Honest: Transparent about its capabilities; no misleading or over-promising features. |
| 47 | +7. Long-Lasting: Avoid trends; aim for timeless, durable design. |
| 48 | +8. Thorough: Attention to detail with every design element serving a purpose. |
| 49 | +9. Environmentally Friendly: Efficient resource use and minimal environmental impact. |
| 50 | +10. Minimalist: Exclude non-essential elements to improve clarity and focus. |
| 51 | + |
| 52 | +--- |
| 53 | + |
| 54 | +#### Jakob Nielsen's 10 Usability Heuristics |
| 55 | + |
| 56 | +1. Visibility of System Status: Keep users informed about what's happening. |
| 57 | +2. Match System to Real World: Use familiar terms and conventions. |
| 58 | +3. User Control and Freedom: Provide "undo" and "redo" options. |
| 59 | +4. Consistency and Standards: Keep similar functions and styles uniform. |
| 60 | +5. Error Prevention: Anticipate and prevent errors before they occur. |
| 61 | +6. Recognition, Not Recall: Reduce user memory load with visible options. |
| 62 | +7. Flexibility and Efficiency of Use: Support both novice and expert users. |
| 63 | +8. Aesthetic and Minimalist Design: Avoid clutter for a clear user interface. |
| 64 | +9. Help Users Recognize, Diagnose, Recover from Errors: Provide clear, constructive error messages. |
| 65 | +10. Help and Documentation: Offer accessible, concise help when needed. |
| 66 | + |
| 67 | +--- |
| 68 | + |
| 69 | +#### Ben Shneiderman's 8 Golden Rules of Interface Design |
| 70 | + |
| 71 | +1. Strive for Consistency: Maintain uniform design across all elements. |
| 72 | +2. Enable Shortcuts for Frequent Users: Use shortcuts for experienced users. |
| 73 | +3. Offer Informative Feedback: Provide immediate feedback on user actions. |
| 74 | +4. Dialogues with Closure: Ensure tasks have clear starts, processes, and endings. |
| 75 | +5. Simple Error Handling: Allow easy identification and correction of errors. |
| 76 | +6. Permit Reversal of Actions: Include “undo” options for user control. |
| 77 | +7. Support Internal Locus of Control: Let users feel in control of their interactions. |
| 78 | +8. Reduce Short-Term Memory Load: Keep information accessible and minimize the need for memory recall. |
| 79 | + |
| 80 | +--- |
| 81 | + |
| 82 | +### Key Takeaways |
| 83 | + |
| 84 | +- User-Centered: Every guideline emphasizes understanding and supporting the user’s journey. |
| 85 | +- Consistency: Uniformity across elements ensures a cohesive, intuitive experience. |
| 86 | +- Error Management: Clear error prevention, recognition, and recovery tools are vital. |
| 87 | +- Clarity and Minimalism: Both aesthetically pleasing and functional designs foster usability. |
| 88 | + |
| 89 | +--- |
| 90 | + |
| 91 | +## Heuristic Evaluation |
| 92 | + |
| 93 | +### Severity Ratings Table |
| 94 | + |
| 95 | +| Rating | Definition | |
| 96 | +| ------ | ---------------------------------------------------------------------------------------------------------------------------- | |
| 97 | +| S0 | No usability issue. Violates a heuristic but doesn't affect usability. | |
| 98 | +| S1 | Cosmetic. Minor issues, infrequent, easy to overlook, not critical for the next release. | |
| 99 | +| S2 | Minor. Occurs more frequently, may be challenging but doesn't significantly hinder usability. Low priority for next release. | |
| 100 | +| S3 | Major. Frequent issues that hinder navigation or usage. Needs immediate fix. | |
| 101 | +| S4 | Catastrophic. Severe issues preventing use of the product, must be fixed before release. | |
| 102 | + |
| 103 | +--- |
| 104 | + |
| 105 | +### Easy-to-Fix Ratings Table |
| 106 | + |
| 107 | +| Rating | Definition | |
| 108 | +| ------ | ----------------------------------------------------------------------------------- | |
| 109 | +| E0 | Maximum effort required, including research and investigation into proper solution. | |
| 110 | +| E1 | Considerable effort required, solution understood but needs time/resources. | |
| 111 | +| E2 | Concentrated effort needed, but the solution is known and feasible. | |
| 112 | +| E3 | Easy to fix. Can be handled quickly with minimal effort by a single developer. | |
| 113 | +| E4 | Trivial. Very simple fix with minimal time and effort. | |
| 114 | + |
| 115 | +--- |
| 116 | + |
| 117 | +### menu icons in avigation |
| 118 | + |
| 119 | +- hamburger |
| 120 | +- kebab |
| 121 | +- meatball |
| 122 | +- bento |
| 123 | +- döner |
| 124 | + |
| 125 | +### 그리드 시스템 |
| 126 | + |
| 127 | +- Columns |
| 128 | +- Rows |
| 129 | +- Gutters |
| 130 | +- Modules |
| 131 | +- Margins |
| 132 | + |
| 133 | +#### Columns |
| 134 | + |
| 135 | +- 12 on desktop, |
| 136 | +- 8 on a tablet, and |
| 137 | +- 4 on mobile. |
| 138 | + |
| 139 | +### 960 그리드 시스템 |
| 140 | + |
| 141 | +- 전체 폭은 960px입니다. |
| 142 | +- 최대 12개의 열을 사용하며, 각 열의 너비는 60px입니다. |
| 143 | +- 총 여백은 20px이며, 각 열의 좌우 여백은 10px입니다. |
| 144 | +- 총 콘텐츠 영역은 940px입니다. |
| 145 | + |
| 146 | +### Design |
| 147 | + |
| 148 | +- shape: geometric, organic, abstract |
0 commit comments