⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Conversation

@robyww
Copy link
Contributor

@robyww robyww commented Feb 6, 2026

Firefly-1936: Clean up obscore/datalink titles and refactor most to a single file

  • Move most title computation to one file
  • add support for datalink description field if it is usable (include usability test)
  • Fixed: issue with titles that changed after a part is analyzed.
  • IRSA-7247: fixed

Testing:

@robyww robyww added this to the 2026.1 milestone Feb 6, 2026
@robyww robyww self-assigned this Feb 6, 2026
@robyww robyww added bug Refactor Refactoring or code cleanup multi-ticket This PR implements multiple Jira tickets labels Feb 6, 2026
@lrebull
Copy link
Contributor

lrebull commented Feb 6, 2026

low-key minor menu placement weirdness

video1362293883.mp4

@lrebull
Copy link
Contributor

lrebull commented Feb 6, 2026

i don't know why i kept saying 'right' when i clearly meant 'left' ... and it does seem to be related to the length of the filename...?

@robyww robyww marked this pull request as ready for review February 6, 2026 19:49
@robyww
Copy link
Contributor Author

robyww commented Feb 6, 2026

@lrebull the menu is shifted because is it so wide now that it uses a different layout approach. The normal is right if it fits, it it does not then it goes left. If you made your browser wider it would probably go back to the right.

@robyww robyww force-pushed the FIREFLY-1936-titles branch from dcebd20 to 8a231cd Compare February 6, 2026 21:36
Copy link
Member

@jaladh-singhal jaladh-singhal left a comment

Choose a reason for hiding this comment

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

Tested spherex - the ancillary products dropdown looks much cleaner now. I didn't notice Luisa's issue, drodown is always on the right for me - likely because I'm using my large monitor over laptop screen.

Code seems fine - left some minor comments.

case Format.HTML : return result(
'Open',
title ? `${title}${otMsg} (html)` : undefined,
'This is a web page or web application. It can be open in another tab',
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
'This is a web page or web application. It can be open in another tab',
'This is a web page or web application. It can be opened in another tab',

small typo

Comment on lines +52 to +67
const result= (title,dropDownText,message='',loadInBrowserMsg=undefined) =>
({title,dropDownText,message,loadInBrowserMsg});
const otMsg= makeObsTitleExtension(obsTitle);

switch (fileType) {
case Format.PNG : return result(
`${title??''}${otMsg} (PNG image)`,
title ? `${title}${otMsg} (PNG image)` : undefined);

case Format.JSON : return result(
'Show JSON file'+otMsg,
title ? `${title}${otMsg} (JSON File)` : undefined);

case Format.YAML : return result(
'Show yaml file'+otMsg,
title ? `${title}${otMsg} (YAML File)` : undefined);
Copy link
Member

Choose a reason for hiding this comment

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

This can be improved for readability using object destructing and overriding syntax - the positional arguments obscure what is being overridden. title and dropdownText can be made even less redundant in each case:

Suggested change
const result= (title,dropDownText,message='',loadInBrowserMsg=undefined) =>
({title,dropDownText,message,loadInBrowserMsg});
const otMsg= makeObsTitleExtension(obsTitle);
switch (fileType) {
case Format.PNG : return result(
`${title??''}${otMsg} (PNG image)`,
title ? `${title}${otMsg} (PNG image)` : undefined);
case Format.JSON : return result(
'Show JSON file'+otMsg,
title ? `${title}${otMsg} (JSON File)` : undefined);
case Format.YAML : return result(
'Show yaml file'+otMsg,
title ? `${title}${otMsg} (YAML File)` : undefined);
const otMsg= makeObsTitleExtension(obsTitle);
const defaultResult = (fileLabel) =>
({title: `Show ${fileLabel}`+otMsg,
dropDownText: title ? `${title}${otMsg} (${fileLabel})` : undefined,
message: '',
loadInBrowserMsg: undefined
});
switch (fileType) {
case Format.PNG : return ({
...defaultResult('PNG image'),
title: `${title??''}${otMsg} (PNG image)`,
});
case Format.JSON : return ({
...defaultResult('JSON File'),
// if you decide to change default in future
});
case Format.YAML : return ({
...defaultResult('YAML File'),
// if you decide to change default in future
});

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good suggestion. I was not that happy this this code for that reason.

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

Labels

bug multi-ticket This PR implements multiple Jira tickets Refactor Refactoring or code cleanup

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants