Back to Coding

Adapt Field Usage Finder Widget

Prompt

You are given a new visual design and NextJS implementation code of the "Field Usage Finder" widget, including files: page.tsx, tailwind.config.ts, loading.tsx, and layout.tsx. Your task is to adapt and rewrite this widget's functionality and appearance to match the new NextJS version as closely as possible, but using the technologies and structure of the existing widget, which is based on AngularJS, Bootstrap, and ServiceNow environment. Specifically: - Carefully review the new NextJS code and the related screenshot of the updated widget UI to fully understand the design, layout, behavior, and features. - Analyze the existing widget implementation provided via template.html, script.js, client_script.js, and css.scss. - Rewrite and adapt the AngularJS/Bootstrap code (template, scripts, styles) of the current widget so that it replicates the look and functionality of the NextJS version as seen in the screenshot, respecting all UI elements, flows, and style details. - Ensure the adapted widget is fully functional according to the NextJS design and that all UI interactions are consistent. - Preserve the structural idioms and best practices of AngularJS and Bootstrap as used in ServiceNow, without introducing NextJS or unrelated frameworks. Step-by-step: 1. Examine the provided NextJS files and screenshot to understand the updated widget. 2. Examine the current AngularJS Bootstrap widget files. 3. Identify all UI/UX differences and new features in the NextJS version. 4. Reimplement these differences in your AngularJS/Bootstrap widget code. 5. Test for consistent appearance and functionality. Output Format: Provide the complete AngularJS/Bootstrap code files updated after adaptation: - template.html - script.js - client_script.js - css.scss Each file should be self-contained and ready to replace the existing widget files. Include any comments needed to clarify major adaptations or design decisions. Note: - Do not translate NextJS React code literally; instead, reinterpret and rewrite in AngularJS style. - Maintain Bootstrap classes and styles adjusted to match the new design. - Preserve existing ServiceNow widget compatibility. This prompt assumes you will receive the NextJS code and screenshots separately and will deliver the adapted AngularJS/Bootstrap files accordingly.

Related Coding Prompts

Write Code

As a seasoned programmer, your task is to write code in [programming language] to [perform action]. The code should be efficient, well-structured, and optimized for performance. Make sure to follow best practices and industry standards while implementing the necessary algorithms and logic to achieve the desired functionality. Test the code thoroughly to ensure it functions as intended and meets all requirements. Additionally, document the code properly for future reference and maintenance.

Debug Code

Act as a seasoned programmer with over 20 years of commercial experience. Analyze the provided [piece of code] that is causing a specific [error]. Your task involves diagnosing the root cause of the error, understanding the context and functionality intended by the code, and proposing a solution to fix the issue. Your analysis should include a step-by-step walkthrough of the code, identification of any bugs or logical mistakes, and a detailed explanation of how to resolve them. Additionally, suggest any improvements or optimizations to enhance the performance, readability, or maintainability of the code based on your extensive experience. Ensure that your solution adheres to best practices in software development and is compatible with the current development environment where the code is being executed.

Do Code Review

As a seasoned programmer with over 20 years of commercial experience, your task is to perform a comprehensive code review on the provided [piece of code]. Your review should meticulously evaluate the code's efficiency, readability, and maintainability. You are expected to identify any potential bugs, security vulnerabilities, or performance issues and suggest specific improvements or optimizations. Additionally, assess the code's adherence to industry standards and best practices. Your feedback should be constructive and detailed, offering clear explanations and recommendations for changes. Where applicable, provide examples or references to support your suggestions. Your goal is to ensure that the code not only functions as intended but also meets high standards of quality and can be easily managed and scaled in the future. This review is an opportunity to mentor and guide less experienced developers, so your insights should be both educational and actionable.