Skip to content
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

fixes #1466

Merged
merged 5 commits into from
Oct 7, 2024
Merged

fixes #1466

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@egovernments/digit-ui-css",
"version": "1.8.2-beta.35",
"version": "1.8.2-beta.36",
"license": "MIT",
"main": "dist/index.css",
"author": "Jagankumar <jagan.kumar@egov.org.in>",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
}

.chart-metric-wrapper{
display: flex;
display: flex;
align-items: baseline;
flex-wrap: wrap;
margin-top: 15px;
justify-content: space-evenly;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -646,3 +646,11 @@ digit-card-text.center {
.infotext {
width: 20rem !important;
}
.mrsm.divToBeHidden.icon-label-download {
align-items: center !important;
}
.chart-metric-wrapper {
.row {
align-items: baseline !important;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,19 @@ import { Link } from "react-router-dom";
import FaqComponent from "../../citizen/FAQs/FaqComponent";

const CardC = ({ type, title, content, actions, style }) => {
const { t } = useTranslation();
const ListTag = type === "number" ? "ol" : "ul";
return (
<div>
{/* <div style={{ border: "1px solid #ccc", borderRadius: "8px", padding: "16px", margin: "16px", ...style }}> */}
<CardSectionHeader>{title}</CardSectionHeader>
<CardSectionSubText style={{ marginTop: "1rem" }}>{content}</CardSectionSubText>
<CardSectionHeader>{t(title)}</CardSectionHeader>
<CardSectionSubText style={{ marginTop: "1rem" }}>{t(content)}</CardSectionSubText>
Comment on lines +14 to +15
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

LGTM: Proper implementation of text translation

The changes correctly implement internationalization for the component's content using the t() function. This is consistent with the PR objective of adding local functionality.

Consider using template literals for better readability when combining translated text with other elements:

{action?.label ? <strong>{`${t(action?.label)}:`}</strong> : null} {t(action?.description)}

Also applies to: 21-21

<div style={{ marginTop: "1rem" }}>
{actions && (
<ListTag>
{actions.map((action, index) => (
<li key={index} style={{ listStyleType: ListTag === "ul" ? "disc" : "auto", margin: "8px 0" }}>
{action?.label ? <strong>{action?.label}:</strong> : null} {action.description}
{action?.label ? <strong>{t(action?.label)}:</strong> : null} {t(action?.description)}
</li>
))}
</ListTag>
Expand All @@ -28,10 +29,11 @@ const CardC = ({ type, title, content, actions, style }) => {
};

const FAQ = ({ key, title, content, faqs }) => {
const { t } = useTranslation();
return (
<div style={{ width: "100%" }}>
<CardSectionHeader>{title}</CardSectionHeader>
<CardSectionSubText style={{ marginTop: "1rem" }}>{content}</CardSectionSubText>
<CardSectionHeader>{t(title)}</CardSectionHeader>
<CardSectionSubText style={{ marginTop: "1rem" }}>{t(content)}</CardSectionSubText>
<div style={{ width: "100%" }}>
{faqs.map((faq, i) => (
<FaqComponent key={"faq_" + i} question={faq.question} answer={faq.answer} lastIndex={i === faqs?.length - 1} />
Expand Down Expand Up @@ -64,7 +66,7 @@ const QuickSetup = ({ cardConfig }) => {
return (
<Card className={"sandbox-guide"} style={{ width: "25rem", height: "47rem", overflowY: "scroll" }}>
{/* <Card style={{ height: "47rem", overflowY: "scroll" }}> */}
<CardHeader>Guide To Sandbox</CardHeader>
<CardHeader>{t("GUIDE_TO_SETUP")}</CardHeader>
jagankumar-egov marked this conversation as resolved.
Show resolved Hide resolved
<div style={{ display: "flex", flexWrap: "wrap" }}>
{cardConfig.map((config, index) => {
return config?.type === "faqs" ? (
Expand Down
2 changes: 1 addition & 1 deletion micro-ui/web/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<link
href="https://fonts.googleapis.com/css2?family=Roboto+Condensed:wght@400;500;700&family=Roboto:wght@400;500;700&display=swap"
rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="https://unpkg.com/@egovernments/digit-ui-css@1.8.2-beta.35/dist/index.css" />
<link rel="stylesheet" href="https://unpkg.com/@egovernments/digit-ui-css@1.8.2-beta.36/dist/index.css" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Action Required: Verify Availability and Documentation of CSS Version 1.8.2-beta.36

The update to @egovernments/digit-ui-css version 1.8.2-beta.36 in index.html lacks an accessible changelog, which raises concerns about its legitimacy and potential impact. Please take the following actions:

  1. Verify Version Availability: Confirm that version 1.8.2-beta.36 is officially released and available.
  2. Check Alternative Documentation Sources: Look for the changelog in alternative repositories or contact the package maintainers for more information.
  3. Confirm Intentional Update: Ensure that this version update was intentional and aligns with project objectives.
🔗 Analysis chain

Approve CSS version update with suggestions.

The update of the @egovernments/digit-ui-css package from version 1.8.2-beta.35 to 1.8.2-beta.36 looks good and aligns with the PR objectives mentioning a CSS update. However, consider the following suggestions:

  1. Verify that this update was intentional and check the changelog for any notable changes in the new version.
  2. Consider hosting the CSS file locally instead of using a CDN to have more control over the exact version and content being served.

To verify the intentionality and impact of this change, you can run the following script:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for other occurrences of the CSS version and verify the changelog

# Test 1: Check for other occurrences of the old version
echo "Checking for other occurrences of version 1.8.2-beta.35:"
rg --type html "1\.8\.2-beta\.35"

# Test 2: Check for partial matches of the new version (in case it's used elsewhere)
echo "Checking for partial matches of version 1.8.2-beta.36:"
rg --type html "1\.8\.2-beta\.36"

# Test 3: Attempt to fetch and display the changelog (if available)
echo "Attempting to fetch changelog:"
curl -s "https://unpkg.com/@egovernments/digit-ui-css@1.8.2-beta.36/CHANGELOG.md" || echo "Changelog not found or not accessible"

Length of output: 667

<link rel="stylesheet" href="https://unpkg.com/@egovernments/digit-ui-components-css@0.0.2-beta.34/dist/index.css"/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#00bcd1" />
Expand Down