Skip to content

Use Description to populate the description on tiles and Use Type to populate Products, Projects, and Services on the DTS website - #131

Open
roseeichelmann wants to merge 6 commits into
rose/add_services_tabfrom
rose/use_type
Open

Use Description to populate the description on tiles and Use Type to populate Products, Projects, and Services on the DTS website#131
roseeichelmann wants to merge 6 commits into
rose/add_services_tabfrom
rose/use_type

Conversation

@roseeichelmann

@roseeichelmann roseeichelmann commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Closes cityofaustin/atd-data-tech#28909
Closes cityofaustin/atd-data-tech#28888

Testing:

Netlify preview

  1. Click through Products, Projects, and Services index list pages. See that the tiles have images, titles, and descriptions populated.
  2. Click on individual tiles and see that everything looks right on the details page too, you can compare w prod
  3. Do you see any regressions?

// The `labels` column is a comma-separated string of labels, so we use wildcard string searching
const QUERY =
"$limit=100000&$where=(labels like '%Project Index%' or labels like '%Product Index%' or labels like '%Service Index%') and labels not like '%Archived Project%' and (pipeline != 'Icebox' or pipeline is null)";
"$limit=100000&$where=(type like '%Project%' or type like '%Product%' or type like '%Service%') and type not like '%Archived Project%' and (pipeline != 'Icebox' or pipeline is null)";

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@katelunceford @amenity will we still be using "Archived Project" as a type?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

it looks like archived project will not be a Type, will it still be used as a Label?

Comment thread components/utils.js
: [];
newIssue.type = getIssueType(newIssue.labels);
// labelType is found in the label
newIssue.labelType = getLabelType(newIssue.labels);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

we already had a field called "type" before which i have renamed to labelType, bc it exists in the Labels field. ie: "Type: DevOps"

body.match(reDescriptionSentence)?.[0] ||
body.match(reDescriptionLinebreak)?.[0];
const reImg = /(?:!\[(.*?)\]\((.*?)\))/;
function parseImage(body) {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

we dont need to parse the body test for the description anymore now that we are using the description field, so this function becomes entirely about parsing the image

@frankhereford frankhereford left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think this code looks good, but I have identified a couple of things that need to get worked out before this goes live. I think the issues are not in this code, however. I believe you may need to coordinate with @katelunceford to get upstream issues fixed which will cause this code to start to work as written.

The first item is concerning the issues' images that I wrote about below, and the second item is that I think that there is an issue with the set of issues that have the GHP label type set to Service. It seems like there are a good chunk of them pertaining to Maximo.

Image

I think it's important to get that source data correct before any of this merges into production.

@katelunceford & @roseeichelmann: Please let me know if any of this doesn't make sense - I would be happy to sync over these issues anytime. Thanks!

Comment on lines +6 to 15
function parseImage(body) {
// find the first img (if one exists)
const reImg = /(?:!\[(.*?)\]\((.*?)\))/;
const imgMatch = body.match(reImg);
let img = null;
if (imgMatch && imgMatch.length > 0) {
img = { alt: imgMatch[1], src: imgMatch[2] };
}
return [description, img];
return img;
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

When I spun this up, I was surprised to see that only one Service card had an image because I knew that @katelunceford had added some to, at least, the dev services. I looked at the issues for these service cards, and it looks like the images have been added using an image tag (example 1) instead of a markdown tag shown below in example 2.

Example 1:
<img width="1382" height="921" alt="Image" src="https://github.com/user-attachments/assets/a21bab84-2377-4547-9bac-ed69085cdf40" />

Example 2:
![ECM Index image](https://github.com/cityofaustin/atd-data-tech/assets/49930868/64ee6500-659f-477b-94d4-9043ca5ec23d)

I think it'd be cleaner to use a consistent mechanism (Example 2 style) in our GitHub issues, and I think getting those issues' images converted should block this going live.

@amenity amenity Jul 28, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks, @frankhereford - this has always caused us trouble; see #16240. 😢 Unfortunately, the Markdown syntax doesn't work consistently either.

If necessary, I'd prefer to standardize to Example 1, as that's the default a user gets when dragging an image from their desktop. Then we'd need to go through the 250+ existing indices to identify and update those using Markdown. I could probably sic Claude on it to expedite save human time on it.

All those Maximo tiles are because a lot of issues were miscategorized as Service types:
Screenshot 2026-07-28 at 8 43 47 PM

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should we make a spinoff issue to update the code to handle a markdown or html image tag? I can't recall why we've never tried to do that.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Rose and I sync'd on this, and we discussed this as an option and looked at some example code that does exactly this. I'll sync up with her and ask if we can go in this direction.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just realized that the old bug report I pulled up had the right issue # but the wrong link. 🙃 Corrected above, and for the record and an excuse to use John's Chrome extension:
#16240 - [Bug] Occasional project index images do not display on the website

@johnclary johnclary left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

looks great! Nice to see this piece of the updates fall into place 🚀

// The `labels` column is a comma-separated string of labels, so we use wildcard string searching
const QUERY =
"$limit=100000&$where=(labels like '%Project Index%' or labels like '%Product Index%' or labels like '%Service Index%') and labels not like '%Archived Project%' and (pipeline != 'Icebox' or pipeline is null)";
"$limit=100000&$where=(type like '%Project%' or type like '%Product%' or type like '%Service%') and type not like '%Archived Project%' and (pipeline != 'Icebox' or pipeline is null)";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@johnclary those are being converted into a single Service: AMANDA support!

Comment on lines +6 to 15
function parseImage(body) {
// find the first img (if one exists)
const reImg = /(?:!\[(.*?)\]\((.*?)\))/;
const imgMatch = body.match(reImg);
let img = null;
if (imgMatch && imgMatch.length > 0) {
img = { alt: imgMatch[1], src: imgMatch[2] };
}
return [description, img];
return img;
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should we make a spinoff issue to update the code to handle a markdown or html image tag? I can't recall why we've never tried to do that.

@amenity

amenity commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

@roseeichelmann @frankhereford - would you like me to make the handle-rowdy-image code issue?

Also, Rose, would you please parse out Services: from the title in each service tile, the way we're doing on the Products & Projects page?

Screenshot 2026-07-30 at 2 54 05 PM Screenshot 2026-07-30 at 2 54 17 PM

@roseeichelmann

Copy link
Copy Markdown
Contributor Author

@amenity that would be great if you could make that issue, and ill go ahead and start on handling the other image types! and thanks for pointing out the need to parse out the Service: -- ill push an update for that

@katelunceford katelunceford left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thanks for this work @roseeichelmann !

I agree that we need to parse out Service: before merging this.

We can fix the image problem with a separate issue, which doesn't need to block this (at least from a product perspective).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants