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

Show object collection name #59

Merged
merged 11 commits into from
Jul 17, 2024
Merged

Show object collection name #59

merged 11 commits into from
Jul 17, 2024

Conversation

brauliorivas
Copy link
Member

@brauliorivas brauliorivas commented Jul 12, 2024

based on #58
BEGINRELEASENOTES

  • eede doesn't show to which collection a datatype belongs. So, in that case, the mousemove event has been modified, so it also checks whether the mouse is over an object. When it is, at the top of the particle, it is shown a small text, indicating the collection name to where the object belongs.

ENDRELEASENOTES

Copy link

github-actions bot commented Jul 12, 2024

PR Preview Action v1.4.7
Preview removed because the pull request was closed.
2024-07-17 15:16 UTC

@brauliorivas brauliorivas linked an issue Jul 14, 2024 that may be closed by this pull request
@tmadlener
Copy link
Contributor

Hi Braulio, very nice. This doesn't address #47 yet though. What was desired there is that the bitfield is parsed to get the bits out for easier interpretation. I.e. (in python)

def parse_bits(bitfield):
  bits = []
  # assuming here that it's a 32 bit wide number, maybe we need 64 as well?
  for i in range(32):
    if (bitfield & (0x1 << i)):
      bits.append(i)
  return bits

status = 1493172224
status_bits = parse_bits(status)
# [24, 27, 28, 30]

and that could then be used to get the actual strings from this map:

const SimStatusBitFieldDisplayValues = {
23: "Overlay",
24: "Stopped",
25: "LeftDetector",
26: "DecayedInCalorimeter",
27: "DecayedInTracker",
28: "VertexIsNotEndpointOfParent",
29: "Backscatter",
30: "CreatedInSimulation",
};

For the box view we could just use the first character and then the mouse-over could have the full strings for example.

@brauliorivas
Copy link
Member Author

brauliorivas commented Jul 15, 2024

Hi Braulio, very nice. This doesn't address #47 yet though. What was desired there is that the bitfield is parsed to get the bits out for easier interpretation. I.e. (in python)

Oh, I forgot about this, we implemented it for the filters. Thank you for explaining it again. Right now, the first character is shown on the box and the full name when mouse over, just like described above.
(the original bit field is shown on the box if no parsed bit matches the strings on the map, and no name is shown on mouse over).

@tmadlener
Copy link
Contributor

Very nice, especially the mouse-over with the full strings. Extremely minor nit-pick, I would remove the commas to save space
image

);
const simulatorStatusFirstLetter = simulatorStatus
.map((s) => s[0])
.join(", ");
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
.join(", ");
.join("");

As "explained" in the top level comment.

Copy link
Contributor

@tmadlener tmadlener left a comment

Choose a reason for hiding this comment

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

This looks good to me now.

@brauliorivas brauliorivas changed the base branch from feat/object-title to main July 17, 2024 15:14
@brauliorivas brauliorivas merged commit 0270a1d into main Jul 17, 2024
2 checks passed
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.

Display parsed simulation status
2 participants