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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(module:alert): Change span to div when applicable for better responsive experience #990

Merged
merged 1 commit into from
Jan 17, 2021

Conversation

anddrzejb
Copy link
Member

馃 This is a ...

  • New feature
  • Bug fix
  • Site / documentation update
  • Demo update
  • Component style update
  • Bundle size optimization
  • Performance optimization
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

馃挕 Background and solution

<Alert> in react ant-design is based on <div> elements while in ant-design-blazor is based on <span> elements, what causes this type of behaviour when resized:
image
Notice that also close button is not visible for closable alert.
Also gif demo:
alert-resize-bug

The fix proposed by this PR is bringing the design directly in line with react ant-design:

  1. Wrap all previous <span> elements with extra <div class="ant-alert-content"> element
  2. Replace all <span> with <div> elements.
    New behaviour after changes:
    alert-resize-fixed

馃摑 Changelog

Language Changelog
馃嚭馃嚫 English
馃嚚馃嚦 Chinese

鈽戯笍 Self Check before Merge

鈿狅笍 Please check all items below before review. 鈿狅笍

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • Changelog is provided or not needed

@codecov-io
Copy link

Codecov Report

Merging #990 (30f18cf) into master (86afda3) will not change coverage.
The diff coverage is 0.00%.

Impacted file tree graph

@@          Coverage Diff           @@
##           master    #990   +/-   ##
======================================
  Coverage    5.73%   5.73%           
======================================
  Files         406     406           
  Lines       21823   21823           
======================================
  Hits         1252    1252           
  Misses      20571   20571           
Impacted Files Coverage 螖
components/alert/Alert.razor 0.00% <0.00%> (酶)

Continue to review full report at Codecov.

Legend - Click here to learn more
螖 = absolute <relative> (impact), 酶 = not affected, ? = missing data
Powered by Codecov. Last update 86afda3...30f18cf. Read the comment docs.

@ElderJames ElderJames merged commit 5893fed into ant-design-blazor:master Jan 17, 2021
@anddrzejb anddrzejb deleted the alertSpanToDiv branch January 17, 2021 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants