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

Bug report: dividers are never rendered #131

Closed
9 of 12 tasks
ZacSweers opened this issue Apr 25, 2024 · 8 comments · Fixed by #137
Closed
9 of 12 tasks

Bug report: dividers are never rendered #131

ZacSweers opened this issue Apr 25, 2024 · 8 comments · Fixed by #137

Comments

@ZacSweers
Copy link

About this issue

If I render the following snippet in markdown, I never see horizontal lines rendered

This is a divider

---

The above is a divider

Will render like so

image

Details

  •  Used library version - 0.14.0
  •  Used platform - Desktop
  •  Used support library version
  •  Used gradle build tools version - N/A
  •  Used tooling / Android Studio version - N/A
  •  Other used libraries, potential conflicting libraries - Jewel

Checklist

@mikepenz
Copy link
Owner

Thank you for the report. This might be a theming matter.

Screenshot 2024-04-25 at 20 23 13 Screenshot 2024-04-25 at 20 23 36

You can pass a custom color to the dividerColor via the markdownColors()

By default it uses MaterialTheme.colors.onSurface.copy(alpha = 0.12f)

@ZacSweers
Copy link
Author

Hmm, I'm not sure. I tested with even using Color.Red hardcoded and had the same issue. You can find a repro here: slackhq/slack-gradle-plugin#825

@ZacSweers
Copy link
Author

Note that the linked project isn't using material, but rather an intellij-esque theme built by jetbrains for use in IJ plugins called Jewel

@ZacSweers
Copy link
Author

Interestingly, while trying to implement this fix, it suddenly started working when I specified a custom component lambda 🤔.

image image

@ZacSweers
Copy link
Author

More interestingly, even though it appears now, I don't seem to be able to change the color even if I hardcode dividerColor to something like Color.Red

@mikepenz
Copy link
Owner

I am trying to get the referenced branch compiling. However when running I'd see:

Caused by: java.lang.ClassNotFoundException: androidx.collection.ScatterMapKt

@ZacSweers
Copy link
Author

It looks like it's because MarkdownDivider doesn't use dividerColor 😅. That'd explain it

image

@mikepenz
Copy link
Owner

🤕 Oh wow. I overlooked that also now going through it 5 times.

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 a pull request may close this issue.

2 participants