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

Annotate support different labels #2388

Merged

Conversation

yucheng11122017
Copy link
Contributor

@yucheng11122017 yucheng11122017 commented Jan 21, 2024

What is the purpose of this pull request?

  • Documentation update
  • Bug fix
  • Feature addition or enhancement
  • Code maintenance
  • DevOps
  • Improve developer experience
  • Others, please explain:

Address #1911

Overview of changes:
Add slot to a-point which allows users to customise their own shape.
Default shape remains a rounded button

Anything you'd like to highlight/discuss:
Options shape, color and opacity does not work when using this customised shape.
I was thinking it can left as it is now (ie shape, color and opacity option helps to control for default button while users can use inline css to style the customised shape)
Alternatively, I can try to see if it can be used to style the customised shape as well.

Testing instructions:

Include this in a file:

<annotate src="./images/annotateSampleImage.png" width="1500" alt="sampleImage">
    <a-point x="25%" y="25%">
        <span class="badge rounded-pill bg-primary">Label</span>
    </a-point>
    <a-point x="50%" y="25%">
        <pic src="./images/deer.jpg" width="50" height="50" />
    </a-point>
    <a-point x="75%" y="25%">
        <div style="background-color: black; color: white; width: 100px; height: 50px;">Text label</div>
    </a-point>
</annotate>

Proposed commit message: (wrap lines at 72 characters)
Add customised shape for annotate point


Checklist: ☑️

  • Updated the documentation for feature additions and enhancements
  • Added tests for bug fixes or features
  • Linked all related issues
  • No unrelated changes

Reviewer checklist:

Indicate the SEMVER impact of the PR:

  • Major (when you make incompatible API changes)
  • Minor (when you add functionality in a backward compatible manner)
  • Patch (when you make backward compatible bug fixes)

At the end of the review, please label the PR with the appropriate label: r.Major, r.Minor, r.Patch.

Breaking change release note preparation (if applicable):

  • To be included in the release note for any feature that is made obsolete/breaking

Give a brief explanation note about:

  • what was the old feature that was made obsolete
  • any replacement feature (if any), and
  • how the author should modify his website to migrate from the old feature to the replacement feature (if possible).

Copy link

codecov bot commented Jan 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (9fb63a8) 48.87% compared to head (7d09d4f) 48.87%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2388   +/-   ##
=======================================
  Coverage   48.87%   48.87%           
=======================================
  Files         124      124           
  Lines        5238     5238           
  Branches     1109     1109           
=======================================
  Hits         2560     2560           
  Misses       2371     2371           
  Partials      307      307           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kaixin-hc
Copy link
Contributor

Thanks for working on this change!

I've checked through your documentation and code and it seems reasonable. However, the desired effect is not displayed, see the following images:

In documentation:
image

When I place the testing code suggested:
image

@yucheng11122017
Copy link
Contributor Author

Thanks for working on this change!

I've checked through your documentation and code and it seems reasonable. However, the desired effect is not displayed, see the following images:

In documentation: image

When I place the testing code suggested: image

Hi Hannah thanks a lot for checking through! Oddly, I also got the same issue when I ran it the first time again today, but afterwards the slots seemed to be working. The deploy preview is also accurately reflects the changes. Not too sure what is causing this issue but could you try running it again?

@kaixin-hc
Copy link
Contributor

Found the issue - as the development guide states here: https://markbind.org/devdocs/devGuide/development/workflow.html#editing-frontend-features you have to either run it in development mode or npm run build:web before serving to see the frontend change.

its working as expected, so good job : )

@kaixin-hc kaixin-hc merged commit c06d2d2 into MarkBind:master Jan 25, 2024
8 checks passed
@kaixin-hc kaixin-hc added the r.Minor Version resolver: increment by 0.1.0 label Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
r.Minor Version resolver: increment by 0.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants